Skip to content

Commit

Permalink
feat: migrate from uglifyjs-webpack-plugin to terser-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
skarunakar committed May 16, 2021
1 parent 6dadc62 commit 4f14e82
Show file tree
Hide file tree
Showing 3 changed files with 256 additions and 35 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
"stylelint-declaration-use-variable": "1.7.2",
"stylelint-processor-styled-components": "1.3.1",
"superagent": "^3.6.0",
"uglifyjs-webpack-plugin": "^2.2.0",
"terser-webpack-plugin": "^4.2.3",
"url-loader": "^0.5.7",
"webpack": "4.42.1",
"webpack-bundle-analyzer": "^3.3.2",
Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const path = require('path');
const webpack = require('webpack');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');

let externals;
Expand Down Expand Up @@ -110,7 +110,7 @@ if (process.env.RELEASE) {
];

optimization = {
minimizer: [new UglifyJsPlugin()],
minimizer: [new TerserPlugin()],
};
} else {
// Normal sass loader. This complains if it runs in the RELEASE job, so only apply it if RELEASE
Expand Down
Loading

0 comments on commit 4f14e82

Please sign in to comment.