Skip to content

Commit

Permalink
Update env-and-mode.md to fix default modes
Browse files Browse the repository at this point in the history
As per this pull request -- vitejs#4483 --, the default mode for `preview` is now `production`
  • Loading branch information
matbarker committed Sep 14, 2021
1 parent e687d98 commit f7cd23a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/guide/env-and-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ interface ImportMetaEnv {

## Modes

By default, the dev server (`serve` command) runs in `development` mode, and the `build` command runs in `production` mode.
By default, the dev server (`dev` command) runs in `development` mode and the `build` and `serve` commands run in `production` mode.

This means when running `vite build`, it will load the env variables from `.env.production` if there is one:

Expand Down

0 comments on commit f7cd23a

Please sign in to comment.