remove uglifyjs-webpack-plugin
Former-commit-id: 276b976c4498a75f1e99e5a0504a22bc2e8af14d
This commit is contained in:
Generated
+616
-379
File diff suppressed because it is too large
Load Diff
@@ -49,7 +49,6 @@
|
|||||||
"sass": "^1.18.0",
|
"sass": "^1.18.0",
|
||||||
"sass-loader": "^7.1.0",
|
"sass-loader": "^7.1.0",
|
||||||
"svg-sprite-loader": "^4.1.3",
|
"svg-sprite-loader": "^4.1.3",
|
||||||
"uglifyjs-webpack-plugin": "^2.1.2",
|
|
||||||
"vue-template-compiler": "^2.5.21"
|
"vue-template-compiler": "^2.5.21"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
|
|
||||||
const VueFilenameInjector = require('./tools/vue-filename-injector')
|
const VueFilenameInjector = require('./tools/vue-filename-injector')
|
||||||
|
|
||||||
// 拼接路径
|
// 拼接路径
|
||||||
@@ -51,23 +50,6 @@ module.exports = {
|
|||||||
propName: process.env.VUE_APP_SOURCE_VIEWER_PROP_NAME
|
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
|
// i18n
|
||||||
config.module
|
config.module
|
||||||
.rule('i18n')
|
.rule('i18n')
|
||||||
|
|||||||
Reference in New Issue
Block a user