docker替换变量,只在production环境进行处理

This commit is contained in:
2025-10-13 14:53:54 +08:00
parent ba91d7ff13
commit 028cc03aeb
3 changed files with 87 additions and 80 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
export function getAppEnvConfig() {
// 1. 优先:运行时注入(Docker)
const runtimeEnv = (window as any).__APP_ENV__;
const runtimeEnv = (window as any).__APP_ENV__ || {};
// 2. 其次:构建时环境变量(.env 文件)
const buildEnv = import.meta.env;