lanzhouYC/vue.config.js

43 lines
1.6 KiB
JavaScript

module.exports = {
// 打包文件配置
publicPath: "/",
assetsDir: "static",
lintOnSave: false,
devServer: {
// overlay: { // 让浏览器 overlay 同时显示警告和错误
// warnings: true,
// errors: true,
// },
// hotOnly: true,
// open: false, // npm run serve后自动打开页面
// https: false, // https:{type:Boolean}
// host: "0.0.0.0", // 匹配本机IP地址(默认是0.0.0.0)
// port: 8989, // 开发服务器运行端口号
proxy: {
'/api': { //代理的名字
// target: 'http://220.163.114.158:5001/',
//wu
// target: 'https://192.168.2.154:5012/',
//target: 'http://192.168.55.13:5002/', //现场地址
target: 'http://172.16.1.178:5001/', //158地址
ws: true,
changeOrigin: true,
pathRewrite: {
'^/api': '',
}
},
'/aps': { //代理的名字
// target: 'http://220.163.114.157:5011/',
//target: 'http://192.168.55.13:5011/', //现场地址
// target: 'http://172.16.1.178:5001/',
// target: 'http://ht.api.umayle.com:2022',
target: 'http://172.16.1.177:5001/', //158地址
ws: true,
changeOrigin: true,
pathRewrite: {
'^/aps': '',
}
},
}
}
}