2022-08-02 08:48:23 +08:00
|
|
|
/**
|
|
|
|
* 配置参考: https://cli.vuejs.org/zh/config/
|
|
|
|
*/
|
|
|
|
module.exports = {
|
|
|
|
publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
|
|
|
|
chainWebpack: config => {
|
|
|
|
const svgRule = config.module.rule('svg')
|
|
|
|
svgRule.uses.clear()
|
|
|
|
svgRule
|
|
|
|
.test(/\.svg$/)
|
|
|
|
.use('svg-sprite-loader')
|
|
|
|
.loader('svg-sprite-loader')
|
|
|
|
},
|
|
|
|
productionSourceMap: false,
|
2022-09-19 16:30:50 +08:00
|
|
|
configureWebpack: config => {
|
|
|
|
if (process.env.NODE_ENV === 'production') {
|
|
|
|
config.performance = {
|
|
|
|
maxEntrypointSize: 2097152, // 大小改为2mb
|
|
|
|
maxAssetSize: 1572864
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2022-08-02 08:48:23 +08:00
|
|
|
devServer: {
|
|
|
|
open: true,
|
|
|
|
port: 8001,
|
|
|
|
overlay: {
|
|
|
|
errors: true,
|
|
|
|
warnings: true
|
2022-09-19 16:30:50 +08:00
|
|
|
},
|
|
|
|
proxy: {
|
|
|
|
'/api': {
|
2023-09-21 22:30:05 +08:00
|
|
|
// target: 'http://india.mes.picaiba.com/'
|
|
|
|
target: 'http://127.0.0.1:8080/'
|
2022-09-19 16:30:50 +08:00
|
|
|
},
|
|
|
|
'/yd-monitor': {
|
2023-09-21 22:30:05 +08:00
|
|
|
// target: 'http://192.168.1.18:8080/' // 开发地址
|
|
|
|
target: 'http://127.0.0.1:8080/'
|
2022-09-19 16:30:50 +08:00
|
|
|
},
|
|
|
|
'/ureport': {
|
2023-09-21 22:30:05 +08:00
|
|
|
// target: 'http://india.mes.picaiba.com/' // ureporter
|
|
|
|
target: 'http://127.0.0.1:8080/'
|
2022-09-19 16:30:50 +08:00
|
|
|
}
|
2022-08-02 08:48:23 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|