File tree Expand file tree Collapse file tree 5 files changed +41
-227
lines changed
Expand file tree Collapse file tree 5 files changed +41
-227
lines changed Original file line number Diff line number Diff line change 11const merge = require ( 'webpack-merge' ) ;
22const webpack = require ( 'webpack' ) ;
33const path = require ( 'path' ) ;
4- const UglifyJSPlugin = require ( 'uglifyjs -webpack-plugin' ) ;
4+ const TerserPlugin = require ( 'terser -webpack-plugin' ) ;
55
66const paths = require ( './paths' ) ;
77
@@ -29,21 +29,7 @@ module.exports = merge(
2929 // // include all types of chunks
3030 // chunks: 'all',
3131 // },
32- minimizer : [
33- new UglifyJSPlugin ( {
34- cache : true ,
35- parallel : true ,
36- sourceMap : true ,
37- uglifyOptions : {
38- mangle : {
39- safari10 : true ,
40- } ,
41- output : {
42- comments : false ,
43- } ,
44- } ,
45- } ) ,
46- ] ,
32+ minimizer : [ new TerserPlugin ( { parallel : true } ) ] ,
4733 concatenateModules : true , // ModuleConcatenationPlugin
4834 namedModules : true , // NamedModulesPlugin()
4935 noEmitOnErrors : true , // NoEmitOnErrorsPlugin
Original file line number Diff line number Diff line change 11const merge = require ( 'webpack-merge' ) ;
22const webpack = require ( 'webpack' ) ;
33const SWPrecacheWebpackPlugin = require ( 'sw-precache-webpack-plugin' ) ;
4- const UglifyJSPlugin = require ( 'uglifyjs -webpack-plugin' ) ;
4+ const TerserJSPlugin = require ( 'terser -webpack-plugin' ) ;
55const BundleAnalyzerPlugin = require ( 'webpack-bundle-analyzer' )
66 . BundleAnalyzerPlugin ;
77const normalizeName = require ( 'webpack/lib/optimize/SplitChunksPlugin' )
@@ -34,21 +34,7 @@ module.exports = merge(commonConfig, {
3434 stats : 'verbose' ,
3535
3636 optimization : {
37- minimizer : [
38- new UglifyJSPlugin ( {
39- cache : true ,
40- parallel : true ,
41- sourceMap : true ,
42- uglifyOptions : {
43- mangle : {
44- safari10 : true ,
45- } ,
46- output : {
47- comments : false ,
48- } ,
49- } ,
50- } ) ,
51- ] ,
37+ minimizer : [ new TerserJSPlugin ( { parallel : true } ) ] ,
5238 concatenateModules : true , // ModuleConcatenationPlugin
5339 namedModules : true , // NamedModulesPlugin()
5440 noEmitOnErrors : true , // NoEmitOnErrorsPlugin
Original file line number Diff line number Diff line change 33 "version" : " 0.1.1" ,
44 "license" : " MIT" ,
55 "private" : true ,
6- "resolutions" : {
7- "uglify-es" : " npm:terser"
8- },
96 "scripts" : {
107 "start" : " cross-env LOCAL_SERVER=1 LOCAL_DEV=1 node scripts/start.js" ,
118 "start:sandbox" : " cross-env SANDBOX_ONLY=true node scripts/start.js" ,
113110 "style-loader" : " ^0.21.0" ,
114111 "sw-precache-webpack-plugin" : " ^0.11.5" ,
115112 "terser" : " ^3.17.0" ,
113+ "terser-webpack-plugin" : " ^1.2.3" ,
116114 "typescript" : " 3.3.4000" ,
117- "uglifyjs-webpack-plugin" : " ^1.2.5" ,
118115 "url-loader" : " 1.0.1" ,
119116 "webpack" : " ^4.10.2" ,
120117 "webpack-bundle-analyzer" : " ^2.13.1" ,
Original file line number Diff line number Diff line change 6767 },
6868 "devDependencies" : {
6969 "dotenv" : " ^6.2.0" ,
70- "extract-text-webpack-plugin" : " 1.0.1" ,
7170 "gatsby-plugin-remove-trailing-slashes" : " ^2.0.6" ,
7271 "gatsby-source-medium" : " ^2.0.2" ,
7372 "prettier" : " ^1.8.2" ,
7473 "rimraf" : " ^2.6.2" ,
75- "terser" : " ^3.17.0" ,
76- "webpack" : " ^1.13.3"
74+ "terser" : " ^3.17.0"
7775 },
7876 "browserslist" : [
7977 " > 1%" ,
You can’t perform that action at this time.
0 commit comments