docs: document fallback for runtime config (#4461)

This commit is contained in:
Daniel Roe 2022-04-20 15:24:59 +01:00 committed by GitHub
parent d0ae5851e4
commit 8d92a9cdba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ Nuxt CLI has built-in [dotenv](https://github.com/motdotla/dotenv) support.
In addition to any process environment variables, if you have a `.env` file in your project root directory, it will be automatically loaded into `process.env` and accessible within your `nuxt.config` file and modules. In addition to any process environment variables, if you have a `.env` file in your project root directory, it will be automatically loaded into `process.env` and accessible within your `nuxt.config` file and modules.
Runtime config values are automatically replaced by matching environment variables at runtime. Runtime config values are automatically replaced by matching environment variables at runtime. For this to work, you _must_ have a fallback value (which can just be an empty string) defined in your `nuxt.config`.
**Example:** **Example:**