From d72851420aeece685b1b1d94e298d5718339585d Mon Sep 17 00:00:00 2001 From: Ben McCann <322311+benmccann@users.noreply.github.com> Date: Thu, 16 Sep 2021 11:43:23 -0700 Subject: [PATCH] [docs] add link to envPrefix option in env var FAQ --- documentation/faq/60-env-vars.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/faq/60-env-vars.md b/documentation/faq/60-env-vars.md index 5433eeec5ef9..47dcd1f51f00 100644 --- a/documentation/faq/60-env-vars.md +++ b/documentation/faq/60-env-vars.md @@ -2,7 +2,7 @@ question: How do I use environment variables? --- -Vite uses [dotenv](https://github.com/motdotla/dotenv) to load environment variables from a file named `.env` or similar. Only environment variables prefixed with `VITE_` are exposed. You would need to instantiate dotenv yourself if you want all environment variables exposed in `process.env['YOUR_ENV_VAR']`. We hope to see all environment variables exposed on the server-side [in the future](https://github.com/vitejs/vite/issues/3176). +Vite uses [dotenv](https://github.com/motdotla/dotenv) to load environment variables from a file named `.env` or similar. Only environment variables prefixed with `VITE_` are exposed ([you can set `envPrefix` to change this](https://vitejs.dev/config/#envprefix)). You would need to instantiate dotenv yourself if you want all environment variables exposed in `process.env['YOUR_ENV_VAR']`. We hope to see all environment variables exposed on the server-side [in the future](https://github.com/vitejs/vite/issues/3176). [Environment variables cannot be used directly in Svelte templates](https://github.com/sveltejs/kit/issues/720) due [an issue in the way Vite's define plugin works](https://github.com/vitejs/vite/issues/3176).