2023-05-12 08:41:33 +00:00
|
|
|
|
/*
|
2024-09-25 08:27:30 +00:00
|
|
|
|
* @FilePath: \screenFront\vue.config.js
|
2023-05-12 08:41:33 +00:00
|
|
|
|
* @Author: 王路平
|
|
|
|
|
* @文件版本: V1.0.0
|
|
|
|
|
* @Date: 2023-01-29 15:16:36
|
|
|
|
|
* @Description:
|
|
|
|
|
*
|
|
|
|
|
* 版权信息 : 2023 by ${再登软件}, All Rights Reserved.
|
|
|
|
|
*/
|
|
|
|
|
const { defineConfig } = require('@vue/cli-service')
|
|
|
|
|
module.exports = defineConfig(
|
|
|
|
|
{
|
|
|
|
|
transpileDependencies: true,
|
2024-09-25 08:27:30 +00:00
|
|
|
|
css: {
|
|
|
|
|
loaderOptions: {
|
|
|
|
|
sass: {
|
|
|
|
|
// 这里的选项会传递给 sass-loader
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
},
|
2023-05-12 08:41:33 +00:00
|
|
|
|
devServer: {
|
|
|
|
|
proxy: {
|
|
|
|
|
[process.env.VUE_APP_BASE_API]: {
|
2024-09-25 08:27:30 +00:00
|
|
|
|
// target: 'http://192.168.110.167:9015', // 想要请求的url地址
|
2023-05-12 08:41:33 +00:00
|
|
|
|
target: 'http://8.130.165.100:9015',
|
2024-09-25 08:27:30 +00:00
|
|
|
|
// target: 'http://192.168.110.19:8080',
|
2023-05-12 08:41:33 +00:00
|
|
|
|
ws: true, // 是否要开启代理
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
pathRewrite: {
|
|
|
|
|
['^' + process.env.VUE_APP_BASE_API]: ''
|
|
|
|
|
}
|
|
|
|
|
// // 是否保留host头,默认为false,如果为false,就会保留,为true会覆盖
|
|
|
|
|
// forward: 'xxx', // 官方给出的解释跟target一致,没用过...
|
|
|
|
|
// // 下边都是官方给的解释...
|
|
|
|
|
// xfwd: true/false, // 添加x-forwar标头
|
|
|
|
|
// secure:true/false, // 是否验证SSL Certs
|
|
|
|
|
// toProxy:true/false, // 传递绝对URL作为路径(对代理代理很有用)
|
|
|
|
|
// prependPath:true/false, // 默认值:true 指定是否将目标的路径添加到代理路径
|
|
|
|
|
// ignorePath:true/false, // 默认值:false 指定是否忽略传入请求的代理路径
|
|
|
|
|
// localAddress:"xxx", // 要为传出连接绑定的本地接口字符串
|
|
|
|
|
// agent:{}, // 传递给http(s).request的对象
|
|
|
|
|
// ssl:{}, // 传递给https.createServer()的对象
|
2024-09-25 08:27:30 +00:00
|
|
|
|
},
|
|
|
|
|
'/socket/': {
|
|
|
|
|
// target: 'http://192.168.1.128:9011', // 想要请求的url地址
|
|
|
|
|
target: 'http://8.130.165.100:9019',
|
|
|
|
|
// target: 'http://192.168.110.19:8080',
|
|
|
|
|
ws: true, // 是否要开启代理
|
|
|
|
|
changeOrigin: true,
|
|
|
|
|
},
|
2023-05-12 08:41:33 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-09-25 08:27:30 +00:00
|
|
|
|
|
|
|
|
|
|
2023-05-12 08:41:33 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
)
|