@cloudflare/vite-plugin
1.70.1 · 19 Nov 2026MIT12.3M / weekRepositoryHomepagenpmAtom feed
1.70.1 is the newest release of 1.x.
In short
2 new2 internal
Release note
Minor Changes
Add support for loading local dev vars from .env files
If there are no
.dev.varsor.dev.vars.<environment>files, when running Wrangler or the Vite plugin in local development mode,
they will now try to load additional local dev vars from.env,.env.local,.env.<environment>and.env.<environment>.localfiles.These loaded vars are only for local development and have no effect in production to the vars in a deployed Worker.
Wrangler and Vite will continue to load.envfiles in order to configure themselves as a tool.Further details:
In
vite buildthe local vars will be computed and stored in a.dev.varsfile next to the compiled Worker code, so thatvite previewcan use them.The
wrangler typescommand will similarly read the.envfiles (if no.dev.varsfiles) in order to generate theEnvinterface.If the
CLOUDFLARE_LOAD_DEV_VARS_FROM_DOT_ENVenvironment variable is"false"then local dev variables will not be loaded from.envfiles.If the
CLOUDFLARE_INCLUDE_PROCESS_ENVenvironment variable is"true"then all the environment variables found onprocess.envwill be included as local dev vars.Wrangler (but not Vite plugin) also now supports the
--env-file=<path/to/dotenv/file>global CLI option. This affects both loading.envto configure Wrangler the tool as well as loading local dev vars.
Patch Changes
vite-plugin: Add Containers-related info logs
Add logs, when a Worker has Containers configured, providing information about container build status, and how to rebuild containers during local development.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.