-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
NODE_ENV not inherited from .env file when running in a different mode #3983
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
Comments
When setting NODE_ENV in the [mode] file, everything works as expected. |
According to the official wiki, when you do In this case, you can make a NODE_ENV=production Then do wiki: |
Vue-cli Version: 3.7.0 I have the same issue NODE_ENV not inherited from .env file when running in a different mode Scenario I run build with : npm run build -- --mode development so what i think is that the config is loaded on the RAM and when the mode is change vue-cli done update config in RAM |
Version
3.7.0
Reproduction link
https://github.com/RickMeijer/bugreport-vuecli-environment
Environment info
Steps to reproduce
Either:
npm run build
npm run build -- --mode=foo
Or:
npm run build -- --mode=foo
What is expected?
NODE_ENV should be 'production'
According to the docs; all environments load the .env file. That should mean it also inherits the variables set therin.
What is actually happening?
NODE_ENV is 'development'
The text was updated successfully, but these errors were encountered: