浏览代码

fix: proxy

duyin 2 年之前
父节点
当前提交
dca722cb29
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      build/index.ts

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