Skip to content
This repository has been archived by the owner on Nov 2, 2024. It is now read-only.

Commit

Permalink
Replace uglifyjs-webpack-plugin with terser-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
hussainweb committed Sep 21, 2020
1 parent 8b3870f commit 9ff1a50
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"sass": "^1.26.11",
"sass-loader": "^10.0.2",
"style-loader": "^1.2.1",
"uglifyjs-webpack-plugin": "^2.1.1",
"terser-webpack-plugin": "^4.2.2",
"webpack": "^4.16.1",
"webpack-command": "^0.5.0",
"webpack-notifier": "^1.6.0"
Expand Down
5 changes: 3 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const MiniCssExtractPlugin = require("mini-css-extract-plugin");
// const WebpackChunkHash = require('webpack-chunk-hash');
const { CleanWebpackPlugin } = require('clean-webpack-plugin');
const WebpackNotifierPlugin = require('webpack-notifier');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
const TerserPlugin = require('terser-webpack-plugin');

const isProduction = process.env.NODE_ENV === 'production';
const useSourcemaps = !isProduction;
Expand Down Expand Up @@ -137,8 +137,9 @@ const webpackConfig = {
}),
],
optimization: {
minimize: true,
minimizer: [
new UglifyJsPlugin({})
new TerserPlugin()
]
}
};
Expand Down

0 comments on commit 9ff1a50

Please sign in to comment.