You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 6, 2023. It is now read-only.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
π Documentation (updates to the documentation or readme)
π Bug fix (a non-breaking change that fixes an issue)
π Enhancement (improving an existing functionality like performance)
β¨ New feature (a non-breaking change that adds functionality)
β οΈ Breaking change (fix or feature that would cause existing functionality to 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.)
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.
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:
options.dev is set to true if NODE_ENV is overridden
I would be very happy with not allowing NODE_ENV to be overridden, but think if we do then we should definitely warn. What was the reason you originally added it (586709a)?
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 NODE_ENV we are overriding and saying hay, we just ignored your env ?
danielroe
changed the title
fix(nuxi): add warnings when NODE_ENV is overridden by user
fix(nuxi): override NODE_ENV for analyze, build & dev commands
Jun 12, 2022
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
π Linked issue
resolves nuxt/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