File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed
packages/react-renderer-demo Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 55
55
"cross-env" : " ^5.2.0" ,
56
56
"firebase-functions-test" : " ^0.1.6" ,
57
57
"firebase-tools" : " ^6.1.0" ,
58
- "rimraf" : " ^2.6.0"
58
+ "rimraf" : " ^2.6.0" ,
59
+ "terser-webpack-plugin" : " ^2.2.1"
59
60
}
60
61
}
Original file line number Diff line number Diff line change
1
+ const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
1
2
const withCSS = require ( '@zeit/next-css' ) ;
2
3
const resolve = require ( 'resolve' ) ;
3
4
const withMDX = require ( '@next/mdx' ) ( {
@@ -70,6 +71,17 @@ module.exports = withBundleAnalyzer(withMDX(withCSS({
70
71
fs : 'empty' ,
71
72
} ;
72
73
74
+ config . optimization . minimizer = [
75
+ ...config . optimization . minimizer ,
76
+ new TerserPlugin ( {
77
+ cache : true ,
78
+ parallel : true ,
79
+ terserOptions : {
80
+ keep_classnames : true , // eslint-disable-line
81
+ keep_fnames : true , // eslint-disable-line
82
+ } ,
83
+ } ) ,
84
+ ] ;
73
85
return config ;
74
86
} ,
75
87
} ) ) ) ;
You can’t perform that action at this time.
0 commit comments