47 lines
1.1 KiB
JavaScript
47 lines
1.1 KiB
JavaScript
/*
|
|
* @Author: your name
|
|
* @Date: 2019-03-28 11:03:36
|
|
* @LastEditTime: 2020-04-23 11:24:58
|
|
* @LastEditors: your name
|
|
* @Description: In User Settings Edit
|
|
* @FilePath: \DBT\vue.config.js
|
|
*/
|
|
|
|
module.exports = {
|
|
lintOnSave: false, //关闭eslint
|
|
runtimeCompiler: true,
|
|
configureWebpack: (config) => {
|
|
if (process.env.NODE_ENV === 'production') {
|
|
config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
|
|
}
|
|
Object.assign(config, {
|
|
externals: {
|
|
"BMap": "BMap"
|
|
}
|
|
})
|
|
|
|
|
|
},
|
|
css: {
|
|
|
|
// 开启 CSS source maps?
|
|
sourceMap: true,
|
|
|
|
},
|
|
productionSourceMap: false,
|
|
devServer: {
|
|
// port: 8080,
|
|
// host: 'localhost',
|
|
|
|
proxy: {
|
|
'/proxy': {
|
|
target: 'http://test.zhongkedongxin.com/platform',
|
|
ws: true, // proxy websockets
|
|
changeOrigin: true, // needed for virtual hosted sites
|
|
pathRewrite: {
|
|
'^/proxy': '' // rewrite path
|
|
}
|
|
},
|
|
}
|
|
}
|
|
}; |