Browse Source

Drop UglifyJS webpack plugin in favor of Terser

develop
Alice Gaudon 5 months ago
parent
commit
d91110fb67
2 changed files with 4 additions and 2 deletions
  1. +1
    -0
      package.json
  2. +3
    -2
      webpack.config.js

+ 1
- 0
package.json View File

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


+ 3
- 2
webpack.config.js View File

@ -1,6 +1,6 @@
const path = require('path');
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';
@ -90,8 +90,9 @@ const config = {
if (!dev) {
config.optimization = {
minimize: true,
minimizer: [
new UglifyJSPlugin(),
new TerserPlugin(),
]
};
}


Loading…
Cancel
Save