mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
docs: update (#1250)
This commit is contained in:
parent
899ccfd7d0
commit
68ddf6aa1f
@ -412,7 +412,7 @@ When running `vite`, environment variables are loaded from the following files i
|
||||
.env.[mode].local # only loaded in specified env mode, ignored by git
|
||||
```
|
||||
|
||||
**Note:** only variables prefixed with `VITE_` are exposed to your code. e.g. `VITE_SOME_KEY=123` will be exposed as `import.meta.env.VITE_SOME_KEY`, but `SOME_KEY=123` will not. This is because the `.env` files may be used by some users for server-side or build scripts and may contain sensitive information that should not be exposed in code shipped to browsers.
|
||||
**Note:** only variables prefixed with `VITE_` are exposed to your code (e.g. `VITE_SOME_KEY=123`) and `SOME_KEY=123` will not. you can access `VITE_SOME_KEY` using `import.meta.env.VITE_SOME_KEY`. This is because the `.env` files may be used by some users for server-side or build scripts and may contain sensitive information that should not be exposed in code shipped to browsers.
|
||||
|
||||
### Using Vite with Traditional Backend
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user