You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you run `CLOUDFLARE_ENV=production vite build` then the output `wrangler.json` file generated by the build will be a flattened configuration for the 'production' Cloudflare environment, as shown in the following example:
34
34
35
-
```json title=wrangler.json
35
+
```json title=dist/wrangler.json
36
36
{
37
37
"name": "my-worker",
38
38
"compatibility_date": "2025-04-03",
@@ -59,6 +59,10 @@ Running `vite dev` or `vite build` without providing `CLOUDFLARE_ENV` will use t
59
59
As Cloudflare environments are applied at dev and build time, specifying `CLOUDFLARE_ENV` when running `vite preview` or `wrangler deploy` will have no effect.
60
60
:::
61
61
62
+
## Secrets in local development
63
+
64
+
<Renderfile="secrets-in-dev" />
65
+
62
66
## Combining Cloudflare environments and Vite modes
63
67
64
68
You may wish to combine the concepts of [Cloudflare environments](/workers/wrangler/environments/) and [Vite modes](https://vite.dev/guide/env-and-mode.html#modes).
0 commit comments