From 0cbdf142b264e9dd94584411b8669be504624492 Mon Sep 17 00:00:00 2001 From: Dan Dascalescu Date: Wed, 4 Dec 2024 22:42:46 +0800 Subject: [PATCH] docs: fix access to env var using VITE_ prefix in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3300999b8..533280f38 100755 --- a/README.md +++ b/README.md @@ -127,7 +127,7 @@ To add an environment variable: 3. Edit `./vite-env.d.ts` and in the `ImportMetaEnv` interface, add your variable with the appropriate type, e.g. `readonly VITE_MY_API_KEY: string;` -4. Then you can read the variable via `import.meta.env.MY_API_KEY` (learn more at [Env Variables and Modes](https://vite.dev/guide/env-and-mode)) +4. Then you can read the variable via `import.meta.env.VITE_MY_API_KEY` (learn more at [Env Variables and Modes](https://vite.dev/guide/env-and-mode)) #### If you want to set it for each package independently: