Skip to content

Commit

Permalink
migrate to terser-webpack-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed Feb 20, 2020
1 parent eba9a78 commit e31af4e
Show file tree
Hide file tree
Showing 3 changed files with 230 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@
"rimraf": "^3.0.0",
"sinon": "^7.5.0",
"sinon-chai": "^3.3.0",
"terser-webpack-plugin": "^2.3.5",
"ts-loader": "^6.2.1",
"ts-node": "^8.4.1",
"tslint": "^5.20.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.6.4",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.41.2",
"webpack-cli": "^3.3.10",
"webpack-dev-server": "^3.9.0"
Expand Down
6 changes: 3 additions & 3 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const webpack = require("webpack");
const path = require("path");
const UglifyJsPlugin = require("uglifyjs-webpack-plugin");
const TerserPlugin = require("terser-webpack-plugin");

module.exports = env => {
if (!env) env = { production: false, karma: false };
Expand Down Expand Up @@ -55,10 +55,10 @@ module.exports = env => {
concatenateModules: true,
minimize: true,
minimizer: [
new UglifyJsPlugin({
new TerserPlugin({
cache: true,
parallel: 4,
uglifyOptions: {
terserOptions: {
output: {
comments: false
}
Expand Down
Loading

0 comments on commit e31af4e

Please sign in to comment.