-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
docs: describe environment override feature #21879
Conversation
Run & review this pull request in StackBlitz Codeflow. |
β Live Preview ready!
|
@@ -29,6 +29,24 @@ Every configuration option is described in the [Configuration Reference](/docs/a | |||
You don't have to use TypeScript to build an application with Nuxt. However, it is strongly recommended to use the `.ts` extension for the `nuxt.config` file. This way you can benefit from hints in your IDE to avoid typos and mistakes while editing your configuration. | |||
:: | |||
|
|||
You can configure fully type , per-environment overrides in your nuxt.config | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc: @danielroe Could we suggest that these overrides are applied based on the key matching the NODE_ENV
environment variable at dev time and build time (if that's how it actually works) ?
Maybe explicitly show an example of how a config that has both $production and $development keys will be resolved ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for suggestion i committed your suggestion now what to do ?
Co-authored-by: Hebilicious <xsh4k3@gmail.com>
Thank you β€οΈ |
Sorry if its a dumb question but is this issue done now ? can i move on to others ? |
Yes, this looks good to me. I'm going to go ahead and merge but it's possible @Hebilicious may have other ideas for improving the docs here? |
Could we suggest that these overrides are applied based on the key matching the NODE_ENV environment variable at dev time and build time (if that's how it actually works) ? Maybe explicitly show an example of how a config that has both $production and $development keys will be resolved ? |
I worry that mentioning NODE_ENV would be more confusing as it's not something that users should ever set themselves. But perhaps saying that |
Best of both worlds, we explicitly mention NODE_ENV, and we could just say that it's automatically handled by the nuxi commands by default and it's not necessary to manually touch it. As a user the first thing that comes to my mind is "how does it works". |
Sounds good π |
π Linked issue
#21616
β Type of change
π Description
I have Defined Newly added Environment config override feature
Resolved #21616
π Checklist