duyin il y a 2 ans
Parent
commit
dca722cb29
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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"), "");
 };
 
 // 环境变量