@cloudflare/vite-plugin 0.0.0-fd5a45520 → 0.0.0-fe0f83310

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -466,6 +466,13 @@ The value of `MY_VAR` will therefore be `'Production var'`.
466
466
  If you run `vite build --mode staging` then the 'staging' Vite mode will be used and the 'staging' Cloudflare environment will be selected.
467
467
  The value of `MY_VAR` will therefore be `'Staging var'`.
468
468
 
469
+ ## Secrets
470
+
471
+ Secrets can be provided to your Worker in local development using a [`.dev.vars`](https://developers.cloudflare.com/workers/configuration/secrets/#local-development-with-secrets) file. If you are using [Cloudflare Environments](#cloudflare-environments) then the relevant `.dev.vars` file will be selected. For example, `CLOUDFLARE_ENV=staging vite dev` will load `.dev.vars.staging` if it exists and fall back to `.dev.vars`.
472
+
473
+ > [!NOTE]
474
+ > The `vite build` command copies the relevant `.dev.vars[.env-name]` file to the output directory. This is only used when running `vite preview` and is not deployed with your Worker.
475
+
469
476
  ## Migrating from `wrangler dev`
470
477
 
471
478
  Migrating from `wrangler dev` is a simple process and you can follow the instructions in the [Quick start](#quick-start) to get started.