-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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(env): test NODE_ENV override before expand #11309
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
Besides vite-plugin-svelte, the failing ones seem to have unrelated issue to this PR. I'm not sure why vite-plugin-svelte is failing though, might need help on that as I'll be away this week, but I don't think the changes here would've affected it from the top of my head. |
@benmccann @dominikg would you check if we can include this PR in a patch? |
/ecosystem-ci run |
📝 Ran ecosystem CI: Open
|
Description
fix #11302
Repro https://stackblitz.com/edit/vitejs-vite-ksgf5q?file=package.json&terminal=build (incorrect build warning)
If
process.env.NODE_ENV
is already set e.g.production
, and there's aNODE_ENV=development
in the.env
file.dotenv-expand
would override asNODE_ENV=production
, making theNODE_ENV=development
check fail.This PR handles
NODE_ENV
before expand.Additional context
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).