Uh oh!
There was an error while loading. Please reload this page.
fix(nuxi): always override NODE_ENV - #5417
Conversation
✅ Deploy Preview for nuxt3-docs canceled.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
pi0
commented
Jun 12, 2022
Thanks for the PR but if we are not recommending custom NODE_ENV, there is no reason to allow overriding it I think. However, it is also worth tracking down what happens with custom env specially for non development builds. It can be simply one or two bugs. |
danielroe
commented
Jun 12, 2022
The cause of nuxt/nuxt#14057 is really a Vite bug (or perhaps it's unfair to say that it's a bug - we could say that Vite does not support building in development mode). Here's how it happens:
I would be very happy with not allowing |
pi0
commented
Jun 12, 2022
Thanks for explaining! I think we can then change the strategy to override to what we expect but also warn if user already set a |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
NODE_ENV
🔗 Linked issue
resolvesnuxt/nuxt#14057
❓ Type of change
📚 Description
This adds warnings if user is overriding the correct NODE_ENV for build/dev/analyze. (Other commands like preview, typecheck or prepare I felt did not particularly matter, but happy to expand the warnings.)
📝 Checklist