File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change 1
1
const fs = require ( 'fs' )
2
2
const path = require ( 'path' )
3
3
const webpack = require ( 'webpack' )
4
+ const TerserPlugin = require ( 'terser-webpack-plugin' ) ;
4
5
5
6
const electronRoot = path . resolve ( __dirname , '../..' )
6
7
@@ -77,7 +78,7 @@ module.exports = ({
77
78
78
79
return ( {
79
80
mode : 'development' ,
80
- devtool : 'inline-source-map' ,
81
+ devtool : false ,
81
82
entry,
82
83
target : alwaysHasNode ? 'node' : 'web' ,
83
84
output : {
@@ -117,6 +118,17 @@ module.exports = ({
117
118
// one of our renderer bundles should import it from the 'timers' package
118
119
setImmediate : false ,
119
120
} ,
121
+ optimization : {
122
+ minimize : true ,
123
+ minimizer : [
124
+ new TerserPlugin ( {
125
+ terserOptions : {
126
+ keep_classnames : true ,
127
+ keep_fnames : true ,
128
+ } ,
129
+ } ) ,
130
+ ] ,
131
+ } ,
120
132
plugins : [
121
133
new AccessDependenciesPlugin ( ) ,
122
134
...( targetDeletesNodeGlobals ? [
You can’t perform that action at this time.
0 commit comments