Skip to content
This repository was archived by the owner on Nov 23, 2021. It is now read-only.

Commit 987c472

Browse files
author
Piotr Gawlowski
authored
Merge pull request #92 from wearereasonablepeople/piotr/migrate-to-terser
Replace uglifyJs with terser
2 parents 0fbc539 + 0bee3cf commit 987c472

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

optimizations/index.js

+3-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
1+
const TerserPlugin = require('terser-webpack-plugin');
22
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');
33

44
module.exports = ({
@@ -15,14 +15,8 @@ module.exports = ({
1515
}
1616
} = {}) => ({
1717
minimizer: [
18-
new UglifyJsPlugin({
19-
sourceMap: false,
20-
parallel: true,
21-
uglifyOptions: {
22-
compress: {
23-
inline: false
24-
}
25-
}
18+
new TerserPlugin({
19+
parallel: true
2620
}),
2721
new OptimizeCSSAssetsPlugin({})
2822
],

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "webpacker",
3-
"version": "4.2.2",
3+
"version": "4.2.3",
44
"description": "Webpack configuration manager",
55
"main": "webpacker.js",
66
"bin": {
@@ -62,7 +62,7 @@
6262
"postcss-will-change-transition": "^1.2.0",
6363
"sass-loader": "^7.1.0",
6464
"style-loader": "^0.23.1",
65-
"uglifyjs-webpack-plugin": "^2.1.1",
65+
"terser-webpack-plugin": "^1.2.3",
6666
"url-loader": "^1.1.2",
6767
"webapp-webpack-plugin": "^2.3.1",
6868
"webpack": "^4.20.2",

0 commit comments

Comments
 (0)