From dca722cb2998313d5f3b202b59ed6b13bd4fdbfb Mon Sep 17 00:00:00 2001 From: duyin Date: Thu, 19 May 2022 22:52:11 +0800 Subject: [PATCH] fix: proxy --- build/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/index.ts b/build/index.ts index 4127d62e4..c6df2e000 100644 --- a/build/index.ts +++ b/build/index.ts @@ -30,7 +30,7 @@ const warpperEnv = (envConf: Recordable): ViteEnv => { // 跨域代理重写 const regExps = (value: string, reg: string): string => { - return value.replace(new RegExp(reg, "g"), ""); + return value.replace(new RegExp(`^${reg}`, "g"), ""); }; // 环境变量