Continue supporting IE11 in examples and legacy buld

This commit is contained in:
Andreas Hocevar
2021-09-10 13:35:30 +02:00
parent 22a0a209ac
commit fa8aa81840
4 changed files with 8 additions and 140 deletions

View File

@@ -1,8 +1,5 @@
import TerserPlugin from 'terser-webpack-plugin';
import path, {dirname} from 'path';
import {fileURLToPath} from 'url';
const baseDir = dirname(fileURLToPath(import.meta.url));
import path from 'path';
export default {
entry: './build/index.js',
@@ -12,22 +9,13 @@ export default {
module: {
rules: [
{
test: /^((?!es2015-)[\s\S])*\.js$/,
test: /\.m?js$/,
use: {
loader: 'buble-loader',
loader: 'babel-loader',
options: {
transforms: {dangerousForOf: true},
presets: [['@babel/preset-env', {targets: 'ie 11'}]],
},
},
include: [
path.join(
baseDir,
'..',
'node_modules',
'@mapbox',
'mapbox-gl-style-spec'
),
],
},
],
},