chore(vite.config.ts): 补充本地API地址路径

This commit is contained in:
horizons 2022-10-24 23:23:33 +08:00
parent 7f10b63480
commit 4a535a2dec
1 changed files with 3 additions and 0 deletions

View File

@ -25,7 +25,10 @@ export default ({ mode }: ConfigEnv): UserConfig => {
open: true, // 运行自动打开浏览器
proxy: {
[env.VITE_APP_BASE_API]: {
// 线上API地址
target: 'http://sapi.youlai.tech',
// 本地API地址
// target: 'http://localhost:8989',
changeOrigin: true,
rewrite: path =>
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')