build: 适配管理端 flow 基路径
- 调整开发与分析环境的 base 和接口前缀为 /flow - 更新 Vite 代理配置,兼容 /flow/api 与 /flow/userCenter - 修复基路径下的 Logo 与启动加载图资源地址
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# public path
|
||||
VITE_BASE=/
|
||||
VITE_BASE=/flow/
|
||||
|
||||
# Basic interface address SPA
|
||||
VITE_GLOB_API_URL=/api
|
||||
VITE_GLOB_API_URL=/flow
|
||||
|
||||
VITE_VISUALIZER=true
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
# 端口号
|
||||
VITE_PORT=5090
|
||||
|
||||
VITE_BASE=/
|
||||
VITE_BASE=/flow/
|
||||
|
||||
# 接口地址
|
||||
VITE_GLOB_API_URL=http://127.0.0.1:8111
|
||||
VITE_GLOB_API_URL=/flow
|
||||
|
||||
# 是否打开 devtools,true 为打开,false 为关闭
|
||||
VITE_DEVTOOLS=false
|
||||
|
||||
@@ -20,13 +20,17 @@ export default defineConfig(async () => {
|
||||
],
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
'/flow/api': {
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
// mock代理目标地址
|
||||
target: 'http://localhost:5320/api',
|
||||
rewrite: (path) => path.replace(/^\/flow/, ''),
|
||||
target: 'http://127.0.0.1:8111',
|
||||
ws: true,
|
||||
},
|
||||
'/flow/userCenter': {
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/flow/, ''),
|
||||
target: 'http://127.0.0.1:8111',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user