-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
35 lines (35 loc) · 948 Bytes
/
vue.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// vue.config.js
const UglifyJsPlugin = require('uglifyjs-webpack-plugin')
module.exports = {
lintOnSave: false,
transpileDependencies: process.env.NODE_ENV === 'development' ? ['*'] : [], // 解决npm run serve某些node_modules依赖不能被babel编译问题
productionSourceMap: process.env.NODE_ENV === 'development',
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
outputDir: process.env.BASE_URL,
assetsDir: 'static',
configureWebpack: {
performance: {
hints: false
},
optimization: {
minimizer: [
new UglifyJsPlugin({
uglifyOptions: {
compress: {
warnings: false,
drop_console: true,// console
drop_debugger: false,
pure_funcs: ['console.log']// 移除console
}
}
})
]
}
},
devServer: {
overlay: {
warnings: false,
errors: false
}
}
}