From 4571ec34030aad4d2847f902932aef9323bb8e32 Mon Sep 17 00:00:00 2001
From: liu <2021943741@qq.com>
Date: 星期二, 25 八月 2026 10:38:25 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_pro2.0' into dev_pro2.0
---
internal/vite-config/src/utils/env.ts | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/internal/vite-config/src/utils/env.ts b/internal/vite-config/src/utils/env.ts
index f342216..d14019b 100644
--- a/internal/vite-config/src/utils/env.ts
+++ b/internal/vite-config/src/utils/env.ts
@@ -38,7 +38,7 @@
match = 'VITE_GLOB_',
confFiles = getConfFiles(),
) {
- let envConfig = {};
+ let envConfig: Record<string, string> = {};
for (const confFile of confFiles) {
try {
@@ -60,6 +60,13 @@
Reflect.deleteProperty(envConfig, key);
}
});
+ // 鍚堝苟杩涚▼鐜鍙橀噺锛屼娇 vite.config.ts 鎸夊叕鍙告敞鍏ョ殑 VITE_GLOB_API_URL 鑳借繘鍏� _app-config 鏂囦欢
+ Object.keys(process.env).forEach((key) => {
+ const value = process.env[key];
+ if (reg.test(key) && value) {
+ envConfig[key] = value;
+ }
+ });
return envConfig as T;
}
--
Gitblit v1.9.3