Skip to content

Commit 20a8982

Browse files
authored
Update docs/nuxt/environment-variables.md
1 parent d551595 commit 20a8982

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/nuxt/environment-variables.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22

33
Nuxt VueFire automatically picks up a few environment variables to configure Firebase from your `.env` file. These usually take precedence over other options defined in `nuxt.config.ts`. They usually try to support the existing Firebase environment variables better.
44

5-
The VueFire config is treated as public Nuxt config, which means that any env variable [defined using the Nuxt convention](https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables) will automatically be picked up by Nuxt. This means you can add, for example, `NUXT_PUBLIC_VUEFIRE_CONFIG_API_KEY=xyz` to your `.env` file and the value will populate in your app at runtime. You will still need to provide empty string values to the vuefire config to prevent an error during development.
5+
Since VueFire config is treated as _Public Runtime Config_, it can also be overridden with [env variables by following the Nuxt convention](https://nuxt.com/docs/guide/going-further/runtime-config#environment-variables). For example, an environment variable named `NUXT_PUBLIC_VUEFIRE_CONFIG_API_KEY=xyz` will override the `config.apiKey`.
6+
Note you still need to provide empty string values to each `config` property that is defined this way.
67

78
## Admin SDK
89

0 commit comments

Comments
 (0)