-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(build): NODE_ENV override by .env #6303
Conversation
Fixes #6302 |
This and #6304 are solving the same issue. But I think #6304 is more correct as currently I do however think that Vite is sorting the priority in reverse than expected though. But fixing it would be a breaking change. |
@bluwy would you like to PR reverting the priority? We can discuss it next week (Friday), and maybe include it in 2.8? It may be too big of a change for a minor and we may need to leave it for 3.0 in May/June |
If we want to change I still think this should be changed 😀. Should be caused by the order here ? |
Why? If I understand line vite/packages/vite/src/node/config.ts Line 1016 in dd8869b
correctly, then it first use the most specific file and defines the vars. |
check https://cli.vuejs.org/guide/mode-and-env.html#environment-variables, see green alert with title https://discord.com/channels/804011606160703521/804011606160703524/926173658219708416 |
you are right! 👍 |
Uhhh I should've tested the |
Would be great to get this merged to fix the issue. The changes looks good to me. |
Description
Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).