-
主要是对: const ENV = ((isDevMode()
? // Get the global configuration (the configuration will be extracted independently when packaging)
((import.meta.env as unknown) as GlobEnvConfig)
: window[ENV_NAME as any]) as unknown) as GlobEnvConfig; 想问一下为什么打包的时候要费那么大劲来创建一个js文件去将环境变量设置到window下去。 |
Beta Was this translation helpful? Give feedback.
Answered by
anncwb
Mar 19, 2021
Replies: 2 comments 2 replies
-
独立出来可以动态配置接口等信息。更改接口不需要重新打包 |
Beta Was this translation helpful? Give feedback.
1 reply
-
_app.config.js内东西打包后随意更改 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
fidelyiu
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
_app.config.js内东西打包后随意更改