diff --git a/examples/templates/example.html b/examples/templates/example.html index f554856137..510d0489e2 100644 --- a/examples/templates/example.html +++ b/examples/templates/example.html @@ -58,7 +58,7 @@
Copy - Edit +
@@ -66,7 +66,6 @@ -
<!DOCTYPE html>
@@ -76,7 +75,7 @@
     <link rel="stylesheet" href="https://openlayers.org/en/v{{ olVersion }}/css/ol.css" type="text/css">
     <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
     <script src="https://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script>
-    <script src="https://openlayers.org/en/v{{ olVersion }}/build/ol.js"></script>{{#if extraHead.remote}}
+    {{#if extraHead.remote}}
 {{ indent extraHead.remote spaces=4 }}{{/if}}{{#if css.source}}
     <style>
 {{ indent css.source spaces=6 }}    </style>{{/if}}
diff --git a/examples/webpack/config.js b/examples/webpack/config.js
index 2a8d1d4ee9..134d3fcb5e 100644
--- a/examples/webpack/config.js
+++ b/examples/webpack/config.js
@@ -38,7 +38,6 @@ const main = {
       {from: 'index.html', to: 'index.html'}
     ])
   ],
-  devtool: 'source-map',
   output: {
     filename: '[name].js',
     path: path.join(__dirname, '..', '..', 'build', 'examples')
@@ -47,6 +46,7 @@ const main = {
 
 // configuration specific to the dev environment
 const dev = {
+  devtool: 'source-map',
   plugins: [
     new webpack.EnvironmentPlugin(
       Object.assign({NODE_ENV: 'development'}, process.env)
diff --git a/examples/webpack/example-builder.js b/examples/webpack/example-builder.js
index 0e94e020aa..7b1c51dfd4 100644
--- a/examples/webpack/example-builder.js
+++ b/examples/webpack/example-builder.js
@@ -150,6 +150,7 @@ ExampleBuilder.prototype.render = async function(dir, chunk) {
       break;
     }
   }
+  jsSource = jsSource.replace(/'\.\.\/src\//g, '\'');
   if (data.cloak) {
     for (const entry of data.cloak) {
       jsSource = jsSource.replace(new RegExp(entry.key, 'g'), entry.value);