remove uglifyjs-webpack-plugin
Former-commit-id: 276b976c4498a75f1e99e5a0504a22bc2e8af14d
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
||||
const VueFilenameInjector = require('./tools/vue-filename-injector')
|
||||
|
||||
// 拼接路径
|
||||
@@ -51,23 +50,6 @@ module.exports = {
|
||||
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME
|
||||
})
|
||||
)
|
||||
// 非开发环境
|
||||
.when(process.env.NODE_ENV !== 'development', config => {
|
||||
config.optimization
|
||||
.minimizer([
|
||||
new UglifyJsPlugin({
|
||||
uglifyOptions: {
|
||||
// 移除 console
|
||||
// 其它优化选项 https://segmentfault.com/a/1190000010874406
|
||||
compress: {
|
||||
drop_console: true,
|
||||
drop_debugger: true,
|
||||
pure_funcs: ['console.log']
|
||||
}
|
||||
}
|
||||
})
|
||||
])
|
||||
})
|
||||
// i18n
|
||||
config.module
|
||||
.rule('i18n')
|
||||
|
||||
Reference in New Issue
Block a user