Major Changes
-
#16262
fe8ce54Thanks @jamesopstad! - Load local Worker secrets with Vite-compatible file resolutionThe plugin now uses Vite's resolved mode and
envDirwhen locating files that provide declared Worker secrets.CLOUDFLARE_ENVis no longer used to select mode-specific.dev.varsand.envfiles. Projects that relied on it should use Vite's--modeoption instead. For preview, set the mode duringvite build;vite previewuses the mode recorded in the Build Output.The deprecated
WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>environment variable is no longer supported. Rename Hyperdrive overrides toCLOUDFLARE_HYPERDRIVE_LOCAL_CONNECTION_STRING_<BINDING_NAME>. -
#16262
fe8ce54Thanks @jamesopstad! - Remove legacy local testing endpoint rewritesThe plugin no longer rewrites legacy local testing endpoints to their canonical
/cdn-cgi/local/*and/__cf_local/*equivalents. Local-development scripts, tests, or integrations that call the legacy endpoints directly must update them as follows:/cdn-cgi/handler/scheduledand/cdn-cgi/mf/scheduled→/cdn-cgi/local/scheduled/cdn-cgi/handler/email→/cdn-cgi/local/email/cdn-cgi/mf/stream/*→/__cf_local/stream/*/cdn-cgi/mf/imagedelivery/*→/__cf_local/imagedelivery/*/cdn-cgi/explorer/*→/cdn-cgi/local/explorer/*
-
#16262
fe8ce54Thanks @jamesopstad! - Use native Cloudflare configuration and Build Output in Vite plugin v2Wrangler cannot deploy apps built with Vite plugin v2. Deploy with
cf deployinstead.The plugin now loads Worker configuration from
cloudflare.config.tsand no longer loads Wrangler configuration files. TheconfigPathandexperimental.newConfigoptions have been removed. Worker configuration supplied through theconfig,auxiliaryWorkers, andprerenderWorkerplugin options now uses the native camelCase configuration format, and the exportedWorkerConfigtype has been updated to match.Projects using a Wrangler configuration file must move their Worker configuration to
cloudflare.config.ts.Builds now always emit a structured Build Output in
.cloudflare/output. When Containers are configured,vite buildbuilds any Dockerfile-backed Container images and records them in the output.vite previewthen reuses those images rather than rebuilding them when the preview server starts.Wrangler is no longer a runtime or peer dependency of the plugin.
-
#16262
fe8ce54Thanks @jamesopstad! - Drop support for Vite 6The minimum supported Vite version is now Vite 7. Projects using Vite 6 must upgrade to Vite 7 or later before updating
@cloudflare/vite-pluginto this release. -
#16262
fe8ce54Thanks @jamesopstad! - Default the entry Worker to thessrVite environmentThe entry Worker's Vite environment now defaults to
ssrinstead of deriving its name from the Worker name. Projects whose Vite configuration or plugins target the entry environment by its previous Worker-derived name must targetenvironments.ssr, or preserve the previous name by settingviteEnvironment.nameexplicitly.
Minor Changes
-
#16262
fe8ce54Thanks @jamesopstad! - Generate Worker types fromcloudflare.config.tsThe plugin now generates
.cloudflare/types/index.d.tsduring development and builds. Generated declarations infer bindings fromcloudflare.config.tsand include runtime types for the configured compatibility date and flags by default. Use the top-leveltypesoption to disable generation or omit runtime types.Include the configuration and generated declarations in the TypeScript configuration for your Worker:
{ "include": ["src", "cloudflare.config.ts", ".cloudflare/types"] }The
experimental.newConfigoption, includingexperimental.newConfig.types, has been removed. -
#16262
fe8ce54Thanks @jamesopstad! - Stabilize theprerenderWorkerplugin optionConfigure a dedicated prerender Worker with the top-level
prerenderWorkeroption instead ofexperimental.prerenderWorker.
Patch Changes
- Updated dependencies []: