更改prod配置

This commit is contained in:
Auora
2025-10-29 14:54:55 +08:00
parent e58f2d807b
commit 2a83719b87
3 changed files with 6 additions and 2 deletions

View File

@@ -25,7 +25,6 @@ VITE_SOURCEMAP=true
# 打包路径 # 打包路径
VITE_BASE_PATH=/ VITE_BASE_PATH=/
# 商城H5会员端域名 # 商城H5会员端域名
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn' VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'

View File

@@ -7,7 +7,7 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
"build:prod": "vite build", "build:prod": "vite build --mode production",
"build:stage": "vite build --mode staging", "build:stage": "vite build --mode staging",
"preview": "vite preview", "preview": "vite preview",
"build:spug": "vite build --mode spug" "build:spug": "vite build --mode spug"

View File

@@ -52,6 +52,11 @@ export default defineConfig (({mode, command}) => {
target: 'http://localhost:5000', target: 'http://localhost:5000',
changeOrigin: true, changeOrigin: true,
rewrite: p => p.replace (/^\/ybplugin/, ''), rewrite: p => p.replace (/^\/ybplugin/, ''),
},
'/prod-api': {
target: 'http://localhost:18080/openhis',
changeOrigin: true,
rewrite: p => p.replace (/^\/prod-api/, ''),
} }
}, },
}, },