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 5555 "cross-env" : " ^5.2.0" ,
5656 "firebase-functions-test" : " ^0.1.6" ,
5757 "firebase-tools" : " ^6.1.0" ,
58- "rimraf" : " ^2.6.0"
58+ "rimraf" : " ^2.6.0" ,
59+ "terser-webpack-plugin" : " ^2.2.1"
5960 }
6061}
Original file line number Diff line number Diff line change 1+ const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
12const withCSS = require ( '@zeit/next-css' ) ;
23const resolve = require ( 'resolve' ) ;
34const withMDX = require ( '@next/mdx' ) ( {
@@ -70,6 +71,17 @@ module.exports = withBundleAnalyzer(withMDX(withCSS({
7071 fs : 'empty' ,
7172 } ;
7273
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+ ] ;
7385 return config ;
7486 } ,
7587} ) ) ) ;
You can’t perform that action at this time.
0 commit comments