From 7f89e2fc9dbb0902a860ce2b4b9c756971342cb1 Mon Sep 17 00:00:00 2001 From: horizons <1490493387@qq.com> Date: Mon, 24 Oct 2022 23:23:33 +0800 Subject: [PATCH] =?UTF-8?q?chore(vite.config.ts):=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0API=E5=9C=B0=E5=9D=80=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Former-commit-id: 4a535a2deca7a2028e51cc426bc4ab8e59c3ac31 --- vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 29bd03d8..6e386363 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -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), '')