mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-18 17:35:57 +00:00
docs: warn about using differently names env variables (#24612)
This commit is contained in:
parent
445fe808c0
commit
64146b4a5d
@ -56,6 +56,11 @@ There are two key requirements:
|
||||
|
||||
1. Only a specially-named environment variable can override a runtime config property. That is, an uppercase environment variable starting with `NUXT_` which uses `_` to separate keys and case changes.
|
||||
|
||||
::callout{color="amber" icon="i-ph-warning-duotone"}
|
||||
Setting the default of `runtimeConfig` values to *differently named environment variables* (for example setting `myVar` to `process.env.OTHER_VARIABLE`) will only work during build-time and will break on runtime.
|
||||
It is advised to use environment variables that match the structure of your `runtimeConfig` object.
|
||||
::
|
||||
|
||||
#### Example
|
||||
|
||||
```sh [.env]
|
||||
|
Loading…
Reference in New Issue
Block a user