🐞 The value of "process.env.NODE_ENV" is always "production"
See original GitHub issueAppearance
In the first line of the “watch. MJS” file, I specified process.env.NODE_ENV = 'development'
But in the vite.config.mjs
file, I always get “production”.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
if(process.env.NODE_ENV === 'production') always false
I had this problem today. When I used set NODE_ENV=production && something in npm scripts then NODE_ENV=production becomes production + " " with...
Read more >Working with Environment Variables in Node.js
If NODE_ENV has the value production, it will then be able to execute npm run start:dev and subsequently nodenv -f. You can do...
Read more >Don't be fooled by NODE_ENV - Sean Connolly
I am only listing it here because inevitably you will consider it to salve the pain of cumbersome environment variables. if (process.env.APP_ENV ===...
Read more >NODE_ENV not set on process.env · Issue #2362
I was very surprised that --mode=production doesn't set process.env.NODE_ENV with value production within webpack.config.js but only ...
Read more >What is NODE_ENV in Node.js
An environment variable is a dynamic-named value that is typically used to provide the ability to ... NODE_ENV=production node app.js.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
人没事就好,平安是福!
If there anything I can do to help, you can tell me.
Hi! Can’t say I’m doing well, no one does… I will never forget that day when I woke up at 5 AM because of explosions. I live in Kharkiv, the city which is being destroyed the most. I got lucky to move away on the first day but forgot to take a lot of stuff, including food, not taking food was the biggest mistake. I’m safe now, but periodically have to go to the shelter because of new explosions around. I’m still not far from the city, now I live in a small town in the city region. Got good internet here, enough water and some food. I really hope all of this ends soon, in any case, my city is already in ruins 😢 Thank you for caring bro ❤️ Appreciate it