diff options
Diffstat (limited to 'juick-server/webpack.config.js')
-rw-r--r-- | juick-server/webpack.config.js | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/juick-server/webpack.config.js b/juick-server/webpack.config.js index 1b0a9a52..8057ec15 100644 --- a/juick-server/webpack.config.js +++ b/juick-server/webpack.config.js @@ -1,6 +1,6 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const StyleLintPlugin = require('stylelint-webpack-plugin'); -const UglifyJsPlugin = require('uglifyjs-webpack-plugin'); +const TerserPlugin = require('terser-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); module.exports = (env, argv) => { @@ -55,10 +55,16 @@ module.exports = (env, argv) => { if (!dev) { config.optimization = { minimizer: [ - new UglifyJsPlugin({ + new TerserPlugin({ cache: true, parallel: true, - sourceMap: dev + sourceMap: dev, + terserOptions: { + output: { + comments: /@license/i + } + }, + extractComments: true }), new OptimizeCSSAssetsPlugin({}) ] |