You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
module.exports = {
|
|
|
|
|
css: {
|
|
|
|
|
loaderOptions: {
|
|
|
|
|
sass: {
|
|
|
|
|
prependData: `@import "~@/assets/scss/style.scss";`
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
productionSourceMap: process.env.NODE_ENV === 'production' ? false : true,
|
|
|
|
|
devServer: {
|
|
|
|
|
proxy: {
|
|
|
|
|
'/api': {
|
|
|
|
|
target: 'http://47.99.104.87:8633',
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
port: 8008
|
|
|
|
|
},
|
|
|
|
|
configureWebpack: config => {
|
|
|
|
|
// 生产去除日志
|
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
|
|
|
config.optimization.minimizer[0].options.terserOptions.compress.warnings = false
|
|
|
|
|
config.optimization.minimizer[0].options.terserOptions.compress.drop_console =
|
|
|
|
|
true
|
|
|
|
|
config.optimization.minimizer[0].options.terserOptions.compress.drop_debugger =
|
|
|
|
|
true
|
|
|
|
|
config.optimization.minimizer[0].options.terserOptions.compress.pure_funcs = [
|
|
|
|
|
'console.log'
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
};
|