Configure builds so they actually work

This commit is contained in:
Andreas Hocevar
2021-09-10 17:46:10 +02:00
parent b4d93141ec
commit ccb9ff6f37
3 changed files with 14 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ import TerserPlugin from 'terser-webpack-plugin';
import path from 'path';
export default {
entry: './build/index.js',
entry: ['regenerator-runtime/runtime', './build/index.js'],
devtool: 'source-map',
mode: 'production',
target: ['web', 'es5'],
@@ -13,7 +13,14 @@ export default {
use: {
loader: 'babel-loader',
options: {
presets: [['@babel/preset-env', {targets: 'ie 11'}]],
presets: [
[
'@babel/preset-env',
{
targets: 'last 2 versions, not dead',
},
],
],
},
},
},