Replies: 2 comments 1 reply
-
自行使用.env文件是可以,但是都用umi了,肯定想知道umi中有没有这种配置 |
Beta Was this translation helpful? Give feedback.
0 replies
-
在 .env 文件里面用 # 注释掉要在build命令里面定义的环境变量,不用删文件吧 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
如题,我是想在build时直接传入对应的环境变量,这样可以让前端项目中不包含任何环境相关的东西,一套代码在jenkins或者ci cd中直接指定环境变量就行了,前端项目不用做修改。 (可以在build时删除rm -rf .env,但是如果变量过多,有的想改,有的不想改,全部删除又要重新在命令行定义一遍)。目前我看到在命令行中输入注入的 变量好像优先级是最低的,有没有一种配置可以自由的来配置命令行变量的优先级。
Beta Was this translation helpful? Give feedback.
All reactions