summaryrefslogtreecommitdiffstats
path: root/webpack.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'webpack.config.js')
-rw-r--r--webpack.config.js27
1 files changed, 23 insertions, 4 deletions
diff --git a/webpack.config.js b/webpack.config.js
index 4fdf4ba5a4..7efde9503e 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -4,17 +4,24 @@ const TerserPlugin = require('terser-webpack-plugin');
module.exports = {
mode: 'production',
entry: {
- index: ['./web_src/js/index', './web_src/js/draw']
+ index: ['./web_src/js/index']
},
devtool: 'source-map',
output: {
path: path.resolve(__dirname, 'public/js'),
- filename: 'index.js'
+ filename: 'index.js',
+ chunkFilename: '[name].js',
},
optimization: {
minimize: true,
minimizer: [new TerserPlugin({
sourceMap: true,
+ extractComments: false,
+ terserOptions: {
+ output: {
+ comments: false,
+ },
+ },
})],
},
module: {
@@ -33,10 +40,22 @@ module.exports = {
corejs: 3,
}
]
- ]
+ ],
+ plugins: [
+ [
+ '@babel/plugin-transform-runtime',
+ {
+ regenerator: true,
+ }
+ ]
+ ],
}
}
- }
+ },
+ {
+ test: /\.css$/i,
+ use: ['style-loader', 'css-loader'],
+ },
]
}
};