Skip to content

Commit

Permalink
chore: clarify NON_EXISTENT replacement
Browse files Browse the repository at this point in the history
Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com>
  • Loading branch information
patak-dev and bluwy committed Mar 7, 2023
1 parent 8e78658 commit 0d82ad1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/guide/env-and-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ Vite also supports replacing env variables in HTML files. Any properties in `imp
<p>Using data from %VITE_API_URL%</p>
```
If the env doesn't exist in `import.meta.env`, e.g. `%NON_EXISTENT%`, it will be ignored and not replaced, unlike `import.meta.env.NON_EXISTENT` in JS where it's replaced as `undefined`.
## Modes
By default, the dev server (`dev` command) runs in `development` mode and the `build` command runs in `production` mode.
Expand Down

0 comments on commit 0d82ad1

Please sign in to comment.