Skip to content

Conversation

@camsteffen
Copy link
Contributor

Fixes #21503

This tries to make the distinction between NODE_ENV and Modes less confusing after my own experience with trying to figure it out. I've detailed my changes and rationale below:

  • The first change removes the last paragraph from the "Modes" section but before "NODE_ENV and Modes". I don't think it is adding any information that is not already covered immediately above. And I find that it lends to a misconception that NODE_ENV=development causes "development mode", when actually NODE_ENV is unrelated to Modes.
  • "NODE_ENV and Modes" heading is changed to just "NODE_ENV". This lets the section have a more focused subject and perhaps lessens the implication that NODE_ENV impacts Modes.
    • The opening statement for NODE_ENV just states what NODE_ENV does in vite.
    • Then there is a statement to clarify that Modes is distinct in case that wasn't clear.
      • Say two different "settings" instead of "concepts". I think it's more like two settings for one concept (the environment). Otherwise we ought to explain what the two concepts are.
    • Removed the table that shows combinations of the two settings because it confused me, making me think that there is some relationship between the two settings or precedence rules between NODE_ENV and --mode - when in fact they are just entirely distinct.
    • Added ... vite build to the example commands in the retained table for clarity.
    • Removed a table showing how Mode works since this is covered elsewhere in the same page.
    • Added a paragraph to guide the reader through choosing one or the other. This may be a bit controversial, but I really think some guidance is needed, so hopefully this is okay.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant