Drop UglifyJS webpack plugin in favor of Terser

This commit is contained in:
Alice Gaudon 2020-10-01 14:38:16 +02:00
parent dcdc8dd704
commit d91110fb67
2 changed files with 4 additions and 2 deletions

View File

@ -44,6 +44,7 @@
"node-sass": "^4.14.0", "node-sass": "^4.14.0",
"nodemon": "^2.0.3", "nodemon": "^2.0.3",
"sass-loader": "^10.0.1", "sass-loader": "^10.0.1",
"terser-webpack-plugin": "^4.2.2",
"ts-jest": "^26.1.1", "ts-jest": "^26.1.1",
"ts-loader": "^8.0.4", "ts-loader": "^8.0.4",
"typescript": "^4.0.2", "typescript": "^4.0.2",

View File

@ -1,6 +1,6 @@
const path = require('path'); const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const UglifyJSPlugin = require('uglifyjs-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin');
const dev = process.env.NODE_ENV === 'development'; const dev = process.env.NODE_ENV === 'development';
@ -90,8 +90,9 @@ const config = {
if (!dev) { if (!dev) {
config.optimization = { config.optimization = {
minimize: true,
minimizer: [ minimizer: [
new UglifyJSPlugin(), new TerserPlugin(),
] ]
}; };
} }