fixed bug causing memory issues

This commit is contained in:
Simon Leigh 2019-12-17 20:21:31 +09:00 committed by Davy
parent 45a29171ac
commit be951ae006

View File

@ -22,16 +22,6 @@ module.exports = (env, argv) => {
devtool: 'inline-source-map',
optimization: {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_fnames: /Block|Value|Bool|BooleanLiteral|Null|NullLiteral|Literal|NumberLiteral|StringLiteral|RegexLiteral|Arr|Obj|Op|Parens/
}
})
]
},
module: {
rules: [
@ -135,5 +125,18 @@ module.exports = (env, argv) => {
; (config.output as any).publicPath = '/app'
}
if (argv.mode === 'production') {
(config as any).optimization = {
minimize: true,
minimizer: [
new TerserPlugin({
terserOptions: {
keep_fnames: /Block|Value|Bool|BooleanLiteral|Null|NullLiteral|Literal|NumberLiteral|StringLiteral|RegexLiteral|Arr|Obj|Op|Parens/
}
})
]
}
}
return config
}