File tree 5 files changed +11
-11
lines changed
5 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ module.exports = function printBuildError(err) {
13
13
const message = err != null && err . message ;
14
14
const stack = err != null && err . stack ;
15
15
16
- // Add more helpful message for UglifyJs error
16
+ // Add more helpful message for Terser error
17
17
if (
18
18
stack &&
19
19
typeof message === 'string' &&
20
- message . indexOf ( 'from UglifyJs ' ) !== - 1
20
+ message . indexOf ( 'from Terser ' ) !== - 1
21
21
) {
22
22
try {
23
23
const matched = / ( .+ ) \[ ( .+ ) : ( .+ ) , ( .+ ) \] \[ .+ \] / . exec ( stack ) ;
Original file line number Diff line number Diff line change 60
60
"rimraf" : " ^2.6.2" ,
61
61
"settle-promise" : " 1.0.0" ,
62
62
"source-map" : " 0.5.6" ,
63
- "uglifyjs -webpack-plugin" : " 1.2.5 " ,
63
+ "terser -webpack-plugin" : " 1.1.0 " ,
64
64
"webpack" : " ^4.8.1"
65
65
},
66
66
"jest" : {
Original file line number Diff line number Diff line change 8
8
9
9
const path = require ( 'path' ) ;
10
10
const webpack = require ( 'webpack' ) ;
11
- const UglifyJsPlugin = require ( 'uglifyjs -webpack-plugin' ) ;
11
+ const TerserPlugin = require ( 'terser -webpack-plugin' ) ;
12
12
13
13
module . exports = {
14
14
mode : process . env . NODE_ENV === 'production' ? 'production' : 'development' ,
@@ -49,8 +49,8 @@ module.exports = {
49
49
minimizer : [
50
50
// This code is embedded as a string, so it would never be optimized
51
51
// elsewhere.
52
- new UglifyJsPlugin ( {
53
- uglifyOptions : {
52
+ new TerserPlugin ( {
53
+ terserOptions : {
54
54
compress : {
55
55
warnings : false ,
56
56
comparisons : false ,
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ const autoprefixer = require('autoprefixer');
12
12
const path = require ( 'path' ) ;
13
13
const webpack = require ( 'webpack' ) ;
14
14
const HtmlWebpackPlugin = require ( 'html-webpack-plugin' ) ;
15
- const UglifyJsPlugin = require ( 'uglifyjs -webpack-plugin' ) ;
15
+ const TerserPlugin = require ( 'terser -webpack-plugin' ) ;
16
16
const MiniCssExtractPlugin = require ( 'mini-css-extract-plugin' ) ;
17
17
const OptimizeCSSAssetsPlugin = require ( 'optimize-css-assets-webpack-plugin' ) ;
18
18
const ManifestPlugin = require ( 'webpack-manifest-plugin' ) ;
@@ -115,10 +115,10 @@ module.exports = {
115
115
} ,
116
116
optimization : {
117
117
minimizer : [
118
- new UglifyJsPlugin ( {
119
- uglifyOptions : {
118
+ new TerserPlugin ( {
119
+ terserOptions : {
120
120
parse : {
121
- // we want uglify-js to parse ecma 8 code. However, we don't want it
121
+ // we want terser to parse ecma 8 code. However, we don't want it
122
122
// to apply any minfication steps that turns valid ecma 5 code
123
123
// into invalid ecma 5 code. This is why the 'compress' and 'output'
124
124
// sections only apply transformations that are ecma 5 safe
Original file line number Diff line number Diff line change 64
64
"style-loader" : " 0.21.0" ,
65
65
"svgr" : " 1.9.2" ,
66
66
"sw-precache-webpack-plugin" : " 0.11.5" ,
67
+ "terser-webpack-plugin" : " 1.1.0" ,
67
68
"thread-loader" : " 1.2.0" ,
68
- "uglifyjs-webpack-plugin" : " 1.2.5" ,
69
69
"url-loader" : " 1.0.1" ,
70
70
"webpack" : " 4.19.0" ,
71
71
"webpack-dev-server" : " 3.1.7" ,
You can’t perform that action at this time.
0 commit comments