Make examples work with ie11

This commit is contained in:
Maximilian Krög
2020-12-29 17:55:41 +01:00
parent caeca7f5b8
commit 358d6736d1
3 changed files with 17 additions and 3 deletions

View File

@@ -68,7 +68,7 @@
<link rel="stylesheet" href="./css/ol.css" type="text/css">
<link rel="stylesheet" href="./resources/layout.css" type="text/css">
<script src="https://unpkg.com/elm-pep"></script>
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL,TextDecoder"></script>
<script src="https://cdn.polyfill.io/v3/polyfill.min.js?features=fetch,requestAnimationFrame,Element.prototype.classList,URL,TextDecoder,Number.isInteger"></script>
{{{ extraHead.local }}}
{{{ css.tag }}}
<title>{{ title }}</title>

View File

@@ -27,18 +27,31 @@ module.exports = {
test: /^((?!es2015-)[\s\S])*\.js$/,
use: {
loader: 'buble-loader',
options: {
transforms: {
dangerousForOf: true,
},
},
},
include: [
path.join(__dirname, '..', '..', 'src'),
path.join(__dirname, '..'),
path.join(
__dirname,
'..',
'..',
'node_modules',
'@mapbox',
'mapbox-gl-style-spec'
),
],
},
{
test: /\.js$/,
use: {
loader: path.join(__dirname, './worker-loader.js'),
loader: path.join(__dirname, 'worker-loader.js'),
},
include: [path.join(__dirname, '../../src/ol/worker')],
include: [path.join(__dirname, '..', '..', 'src', 'ol', 'worker')],
},
],
},