WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 886873f

Browse files
committed
Add additional paragraph
1 parent 8261586 commit 886873f

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -395,9 +395,14 @@ This is because the environment name is automatically appended to the top-level
395395
> The default Vite environment name for a Worker is always the top-level name.
396396
> This enables you to reference the Worker consistently in your Vite config when using multiple environments.
397397
398-
Running `vite dev` or `vite build` without providing `CLOUDFLARE_ENV` will use the default top-level environment.
399-
The value of `MY_VAR` will therefore be `'Top-level var'`.
400-
As Worker environments are applied at dev and build time, specifying `CLOUDFLARE_ENV` when running `vite preview` or `wrangler deploy` will have no effect.
398+
Worker environments can also be used in development.
399+
For example, you could run `CLOUDFLARE_ENV=development vite dev`.
400+
It is common to use the default top-level environment as the development environment and then add additional environments as necessary.
401+
402+
> [!NOTE]
403+
> Running `vite dev` or `vite build` without providing `CLOUDFLARE_ENV` will use the default top-level environment.
404+
> The value of `MY_VAR` will therefore be `'Top-level var'`.
405+
> As Worker environments are applied at dev and build time, specifying `CLOUDFLARE_ENV` when running `vite preview` or `wrangler deploy` will have no effect.
401406
402407
### Combining Worker environments and Vite modes
403408

0 commit comments

Comments
 (0)