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"), ""); }; // 环境变量