|
|
@@ -3,7 +3,7 @@ const path = require('path')
|
|
|
const webpack = require('webpack')
|
|
|
const {
|
|
|
isProd,
|
|
|
- isStaging,
|
|
|
+ logger,
|
|
|
features
|
|
|
} = require('./feature')
|
|
|
|
|
|
@@ -138,14 +138,13 @@ module.exports = {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
|
|
|
+ // https:// webpack.js.org/configuration/optimization/#optimizationruntimechunk
|
|
|
config
|
|
|
.optimization.runtimeChunk('single')
|
|
|
- // optimization
|
|
|
config
|
|
|
.optimization.minimizer('terser').tap(args => {
|
|
|
// clear console.x
|
|
|
- args[0].terserOptions.compress.drop_console = !isStaging
|
|
|
+ args[0].terserOptions.compress.drop_console = !logger
|
|
|
return args
|
|
|
})
|
|
|
})
|