组件流程开发
This commit is contained in:
+18
-4
@@ -22,7 +22,7 @@ function getLocalIpAddress() {
|
||||
// https://vitejs.dev/config/
|
||||
export default defineConfig(({ mode, command }) => {
|
||||
const env = loadEnv(mode, process.cwd());
|
||||
const { VITE_APP_ENV ,VITE_APP_PATH} = env;
|
||||
const { VITE_APP_ENV, VITE_APP_PATH } = env;
|
||||
return {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
||||
@@ -50,18 +50,32 @@ export default defineConfig(({ mode, command }) => {
|
||||
disableHostCheck: true,
|
||||
host: getLocalIpAddress(),
|
||||
open: true,
|
||||
hmr:{overlay:false},
|
||||
hmr: { overlay: false },
|
||||
proxy: {
|
||||
// https://cn.vitejs.dev/config/#server-proxy
|
||||
"/qomo": {
|
||||
// target: "http://172.16.0.241:8095", //wq
|
||||
target: "http://172.16.0.214:8095", //bgy
|
||||
// target: "http://192.168.50.9:8095",
|
||||
target: "http://172.16.0.162:8082", //bgy
|
||||
// target: "http://192.168.50.9:2999",//中智平台
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
"^/qomo": "/qomo"
|
||||
}
|
||||
},
|
||||
"/qomo/flowSocket": {
|
||||
// target: 'ws://192.168.0.66:60601/',这是后端接口地址
|
||||
target: 'ws://172.16.0.162:8082',
|
||||
// target: 'ws://192.168.50.99:2999',
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
},
|
||||
"/qomo/taskSocket": {
|
||||
// target: 'ws://192.168.0.66:60601/',这是后端接口地址
|
||||
target: 'ws://172.16.0.162:8082',
|
||||
// target: 'ws://192.168.50.99:2999',
|
||||
changeOrigin: true,
|
||||
ws: true
|
||||
},
|
||||
},
|
||||
headers: {
|
||||
"Access-Control-Allow-Origin": "*"
|
||||
|
||||
Reference in New Issue
Block a user