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.
40 lines
1.4 KiB
JavaScript
40 lines
1.4 KiB
JavaScript
module.exports = {
|
|
// css: {
|
|
// loaderOptions: {
|
|
// // Sass 样式传入共享的全局变量
|
|
// sass: {
|
|
// // data: `@import "@/style/variable.scss"; @import "@/style/mixin.scss";`
|
|
// },
|
|
// less: {
|
|
// javascriptEnabled: true,
|
|
// }
|
|
// }
|
|
// },
|
|
productionSourceMap: process.env.NODE_ENV === 'production' ? false : true,
|
|
// chainWebpack: config => {
|
|
// // vuecli 3默认开启prefetch(预先加载模块),提前获取用户未来可能会访问的内容 (也可手动设置)
|
|
// config.plugins.delete('prefetch')
|
|
// },
|
|
devServer: {
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://115.236.65.98:8004',
|
|
},
|
|
},
|
|
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'
|
|
]
|
|
}
|
|
},
|
|
};
|