screenFront/vue.config.js
2025-01-14 14:30:54 +08:00

60 lines
2.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* @FilePath: \screenFront\vue.config.js
* @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,
css: {
loaderOptions: {
sass: {
// 这里的选项会传递给 sass-loader
},
},
},
devServer: {
proxy: {
[process.env.VUE_APP_BASE_API]: {
// target: 'http://192.168.10.98:9015', // 想要请求的url地址
target: 'http://8.141.87.86:9015',
// target: 'http://192.168.110.19:8080',
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()的对象
},
'/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,
},
}
}
}
)