NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2609 most downloaded on npm
Cloudflare plugin for Vite
Last release 3 days ago
02 Oct 2026
Ships on a steady schedule
a new release about every 9 days
Most releases are documented
notes for 51 of the last 60 stable releases
6 versions withdrawn
withdrawn after publishing
2 years old
884 releases · first in 2025
One column per month.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Updated dependencies [ 7f700ef , 90e6a1b , 7f57b1c , 6a4b0fe ]:
7f700ef, 90e6a1b, 7f57b1c, 6a4b0fe]:
Updated dependencies [ b8e7cc3 , b00ef4f , 9d7b08e , 464a582 , aee2842 , efd67e6 ]:
Updated dependencies [ b9f1cdc , ddaa558 , 8468487 , a0712e5 , a0712e5 ]:
Updated dependencies [ 91a3606 , 2a15ae2 ]:
91a3606, 2a15ae2]:
Undici 7.29.1 fixes GHSA-3wwx-pv8p-q78v . Update the shared dependency catalog and matching types used by Miniflare and Wrangler so downstream install
#15938 62fd03a Thanks @dieub! - Resolve the affected Undici dependency in new Wrangler and Vite plugin installs
Undici 7.29.1 fixes GHSA-3wwx-pv8p-q78v. Update the shared dependency catalog and matching types used by Miniflare and Wrangler so downstream installs can resolve the patched runtime without an application-level override. A published release is still required for consumers; this changeset does not alter already published package metadata.
Updated dependencies [7bb6eae, 60ccdbd, 62fd03a, 06ed9c8, 86211fe, c2bb4c8, eb1efe0, 485cfb3]:
Experimental cloudflare.config.ts projects must now import defineConfig , bindings, triggers, and related helpers from cf/config . Generated declarati
#15914 7f0734c Thanks @jamesopstad! - Use cf/config for cloudflare.config.ts authoring
Experimental cloudflare.config.ts projects must now import defineConfig, bindings, triggers, and related helpers from cf/config. Generated declarations from Wrangler and the Vite plugin also reference this package, so projects using the experimental configuration flow must add cf as a dependency.
The Vite plugin no longer exports @cloudflare/vite-plugin/experimental-config. wrangler/experimental-config remains available for defineWranglerConfig, but no longer re-exports Cloudflare configuration helpers.
#15878 e7915c1 Thanks @dawNotPoi! - Keep dependency optimization caches stable on the first Vite dev server restart.
The first dev server restart no longer re-optimizes unchanged dependencies, including in projects without Containers. Container images are still cleaned up when the server closes, even after a config reload removes the Cloudflare plugin.
Updated dependencies [7f0734c]:
A Workflow declared in a Worker's exports is now available on ctx.exports in wrangler dev , the Vite plugin and the Vitest plugin, with the same API a
#15856 4c2993b Thanks @Naapperas! - Support Workflows declared in exports on ctx.exports in local development
A Workflow declared in a Worker's exports is now available on ctx.exports in wrangler dev, the Vite plugin and the Vitest plugin, with the same API as a Workflow binding:
const instance = await ctx.exports.MyWorkflow.create({
params: { name: "World" },
});ctx.exports and workflows bindings with the same Workflow name share their instances, including instances created before the Workflow was declared in exports. Two Workers can't export the same Workflow name, and a binding to an exported Workflow must refer to the Worker and class that export it. getPlatformProxy() ignores Workflows declared in exports, since it doesn't run the Worker's code.
wrangler workflows commands run with --local also work with Workflows declared only in exports, without a workflows binding.
In the Vitest plugin, introspectWorkflow() and introspectWorkflowInstance() still need a Workflow binding, and now explain how to add one when passed a Workflow from ctx.exports. Instances created through ctx.exports are introspected too. A workflows binding whose script_name is the Worker's own name now resolves to the Worker itself again.
8dc53ae, 4c2993b]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
When Wrangler's --experimental-new-config flag or Vite's experimental.newConfig option is enabled, inferred configuration and runtime declarations are
#15778 cd7508c Thanks @jamesopstad! - Generate types during development and supported builds with Vite's experimental.newConfig option or Wrangler's --experimental-new-config flag (and --experimental-cf-build-output for builds)
When Wrangler's --experimental-new-config flag or Vite's experimental.newConfig option is enabled, inferred configuration and runtime declarations are now kept in .cloudflare/types/index.d.ts. Vite refreshes them during development and production builds. Wrangler refreshes them during development and when building with both --experimental-new-config and --experimental-cf-build-output. In the experimental wrangler.config.ts format, the types option is now top-level because it applies to both commands.
#15765 1bdb96d Thanks @th0m! - Prepare the required egress sidecar for local Containers without configured images
Wrangler dev and Vite dev/preview now pull the required sidecar for Durable Object-managed Containers that select their application image at start time. Previously, these Containers failed to start unless the sidecar image was already cached in Docker.
Updated dependencies [1bdb96d, cd7508c, f5605f5]:
Updated dependencies [ 59267fc , 6906bf0 , 354ebdb ]:
59267fc, 6906bf0, 354ebdb]:
Updated dependencies [ ad20547 , 02c1d83 , 275184d , bd59eca ]:
ad20547, 02c1d83, 275184d, bd59eca]:
Updated dependencies [ 0ed4c54 , 703922d , 14d946d ]:
The root remains config.json , Worker configs are now worker.config.json , and Container configs are now container.config.json . Resource configs no l
#15713 3c75cad Thanks @jamesopstad! - Identify experimental Build Output resource configs by filename and location
The root remains config.json, Worker configs are now worker.config.json, and Container configs are now container.config.json. Resource configs no longer contain top-level type discriminators, while settings and build context are stored together in the root config.
#15713 3c75cad Thanks @jamesopstad! - Define experimental Cloudflare configuration with a single default export
Experimental cloudflare.config.ts files now define settings and resources together in a default-exported defineConfig() call. Add a Worker under worker, add Containers to the containers array, or omit both to provide settings only.
import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
export default defineConfig({
accountId: "...",
complianceRegion: "public",
worker: {
name: "my-worker",
compatibilityDate: "2026-09-18",
entrypoint,
},
});#15711 91e2f86 Thanks @ghostwriternr! - Allow local Container images without exposed ports
Wrangler and the Cloudflare Vite plugin no longer reject images that omit Docker EXPOSE metadata. Local Containers can run command-only workloads or serve traffic through workerd without declaring an unused image port.
Updated dependencies [3c75cad, 3c75cad, 91e2f86, c5913a6, 35668d7, 3c75cad, 45b3b81, 8235e6a, 0751490, 43b1f85, 731a2ee]:
Wrangler and the Cloudflare Vite plugin now build Dockerfile-backed Container images when experimental Build Output is enabled. Container configs are
#15609 1f070c8 Thanks @emily-shen! - Build Containers when emitting experimental Build Output
Wrangler and the Cloudflare Vite plugin now build Dockerfile-backed Container images when experimental Build Output is enabled. Container configs are emitted under .cloudflare/output/v0/containers with local image references, while existing registry references pass through unchanged.
#15329 c4c9b75 Thanks @akshitsinha! - Evaluate Flagship flags locally during development
Flagship bindings now use the local Miniflare store by default in Wrangler and the Vite plugin, keeping development offline and isolated from production flags. Set remote: true on a binding to continue using its remote app.
Use wrangler flagship flags pull <APP_ID> to seed the store from a remote app. Flag management commands also accept --local to read and update the local store directly.
#15701 643e5cc Thanks @WillTaylorDev! - Pass Preview intent to defineWorker and upload its resolved configuration
Preview builds now evaluate programmatic Worker configuration with ctx.isPreview set to true and record that intent in Build Output. The shared Preview uploader deploys the resolved bindings and settings while preserving configured Preview base values when it creates a Preview.
The Vite plugin builds or pulls named images from Wrangler configuration and exposes their local tags through ctx.container.images . Pass one of those
#15674 a939a6c Thanks @ghostwriternr! - Support explicit named Container image selection in local development
The Vite plugin builds or pulls named images from Wrangler configuration and exposes their local tags through ctx.container.images. Pass one of those references to ctx.container.start({ image }) to select the image.
This extends the experimental Durable Object-managed Containers interface.
Updated dependencies [ 71b6f10 , ad23e6e , bac0c6a , be2437a , bac0c6a , 6f3d7b5 ]:
The Local Explorer endpoint list is now consistent across the three places it appears: the AGENTS.md template in create-cloudflare , the runtime agent
#14775 1be7b97 Thanks @dario-piotrowicz! - Sync Local Explorer endpoint lists across agent hints
The Local Explorer endpoint list is now consistent across the three places it appears: the AGENTS.md template in create-cloudflare, the runtime agent hint in wrangler dev, and the Vite plugin agent hint. All three now include the observability/clear endpoint, use the canonical /cdn-cgi/local/explorer path, and have cross-reference comments pointing to each other.
#15399 982b806 Thanks @tpmmorris! - Improve over-limit run_worker_first errors when duplicate rules are present
The error now reports distinct and duplicate-entry counts and lists duplicated rules, making it clear when removing redundant entries can bring the configuration within the limit.
Too many `run_worker_first` rules were provided; 105 rules provided (99 distinct, 6 duplicate entries) exceeds max of 100. Note: duplicate entries count towards the route limit. Ensure that no duplicate rules are present in your `run_worker_first` configuration.
The duplicated rules found are:
- "/rule/0"
- "/rule/1"
- "/rule/2"
- "/rule/3"
- "/rule/4"
...and 1 more duplicated rule.
Updated dependencies [1be7b97, b149147, 7db596c, 76c0ce6, a83d7ac, a0856da, e35c4a1, d3565a5, a83d7ac, cb0955f, fa79b26, 16d1310, ca71205, 1015cfb, 982b806, ffabe74, 7db596c, e03822a, a83d7ac, 641df47, c4a6279]:
Miniflare stores local D1, KV, R2, and observability state under .wrangler/state . Those writes were watched as source changes on Linux and Windows, w
#15574 164e4fb Thanks @RealBhupesh! - Ignore .wrangler persistence writes in Vite's file watcher
Miniflare stores local D1, KV, R2, and observability state under .wrangler/state. Those writes were watched as source changes on Linux and Windows, which fired every plugin hotUpdate hook and could make page loads take seconds. The plugin now ignores **/.wrangler/** while preserving any server.watch.ignored patterns already set by the user.
Updated dependencies [8997652]:
Updated dependencies [ 945aaa3 , 945aaa3 , 47d906f , c2699bf , 945aaa3 , 945aaa3 ]:
Fetch-only remote bindings such as D1 and R2 previously opened an unused WebSocket RPC session. RPC sessions are now created only when an RPC method i
#15432 f45b596 Thanks @razethion! - Prevent delayed internal errors from fetch-only remote bindings
Fetch-only remote bindings such as D1 and R2 previously opened an unused WebSocket RPC session. RPC sessions are now created only when an RPC method is called.
Updated dependencies [0b43395, 9d75006, b605aa6, f45b596, f69f95a, a549e58, 36aed7f, 493e635, bff525d, dbb3ff4, fea3cd0, 96688b3, 6bd7b6c, 15cd6e1, be1caec, ed5797a, dbc9506, 128235a, f8aea7e, 24ef86b]:
Updated dependencies [ edb3631 , dbf6aad , bcebf08 , e20df20 , e20df20 , 63c7ff1 , a4e41df ]:
Nothing published for this version
The Vite plugin now reports the Worker name, HTTP status, and response body when fetching export types fails. This preserves the underlying error inst
#15407 7662118 Thanks @xgame92! - Surface Worker export type fetch errors during development
The Vite plugin now reports the Worker name, HTTP status, and response body when fetching export types fails. This preserves the underlying error instead of replacing it with a JSON parsing error.
Updated dependencies [00a9f2f, 1dba24a, d40a634, 7c1b2a6, 93d72a5, f6fb347, f6fb347, dc24057, d2d8eea]:
Updated dependencies [ dbbb795 , 200780f , b3f2628 , 87a7acf , 1809c5e , ea28cc3 , b3fb2bf , 707cb6f ]:
Updated dependencies [ eb01850 , e1df91a , b23de74 , 015550a , 015550a , 015550a , 3650d29 , b23de74 ]:
Updated dependencies [ 412c79e , 92874f6 , fe265f8 ]:
412c79e, 92874f6, fe265f8]:
Miniflare now automatically passes the Docker privileges needed for FUSE to local Durable Object containers when using local rootless Docker on Linux
#15134 c66d2d5 Thanks @gpanders! - Enable FUSE-capable local container development
Miniflare now automatically passes the Docker privileges needed for FUSE to local Durable Object containers when using local rootless Docker on Linux with /dev/fuse available, or a local Docker engine on macOS or through WSL where Linux containers run in a VM. This applies to Wrangler, the Cloudflare Vite plugin, and direct Miniflare use.
#15326 9fcb1c9 Thanks @jamesopstad! - Record the selected mode in the Build Output Specification top-level config.json
The mode a build was produced in is now written to .cloudflare/output/v0/config.json as a mode field, alongside the account and compliance settings.
Updated dependencies [ 59872c4 , c68f9cb , 99a1f49 , 5ae9d5b , 4b52975 , ce9b151 , ef73a28 , 649f667 , 39dcea6 , 99a1f49 , 99a1f49 , 99a1f49 , f2437e6
Nothing published for this version
Updated dependencies [`b8fd112`, `f0f2054`, `339509d`]:
As of compatibility date 2026-08-04, workerd enables the nodejs_compat and nodejs_compat_v2 compatibility flags by default. Previously these tools onl
#15123 d0c976c Thanks @dependabot! - Detect Node.js compatibility from the compatibility date, now that nodejs_compat is enabled by default
As of compatibility date 2026-08-04, workerd enables the nodejs_compat and nodejs_compat_v2 compatibility flags by default. Previously these tools only treated Node.js compatibility as enabled when one of those flags was listed explicitly, so a Worker on a compatibility date of 2026-08-04 or later without the flag would get Node.js APIs from the runtime but no Node.js polyfills from the bundler, and process.env could be substituted with an empty object at build time. They now resolve these flags the same way workerd does, and honour no_nodejs_compat to opt out.
To keep Node.js compatibility switched off on a newer compatibility date, specify both no_nodejs_compat and no_nodejs_compat_v2, since each flag has its own default.
@cloudflare/vitest-pool-workers needs nodejs_compat_v2 for its own test runner, so it continues to override a project that opts out of it. On a compatibility date that enables the flag anyway, it now drops the opt-out rather than adding the flag back, which workerd would reject — previously this stopped such a project from running any tests at all.
wrangler types also no longer attributes its @types/node suggestion to "the nodejs_compat flag", which it can now make for Workers that do not set the flag at all.
#15148 0b82b15 Thanks @jamesopstad! - Ignore a nodejs_compat compatibility flag that the compatibility date already enables
workerd rejects a compatibility flag that its compatibility date enables by default, so a Worker configured with both a compatibility date of 2026-08-04 or later and nodejs_compat failed to start locally with "The compatibility flag nodejs_compat became the default as of 2026-08-04 so does not need to be specified anymore".
The redundant nodejs_compat and nodejs_compat_v2 flags are now dropped when starting the runtime, which has no effect on the resulting Worker because the compatibility date enables both anyway. no_nodejs_compat and no_nodejs_compat_v2 still switch Node.js compatibility off, and a flag specified alongside its own opt-out is left alone so that workerd still reports those as contradictory.
Updated dependencies [d0c976c, d0c976c, 0b82b15, d0c976c, d0c976c, 90dd5e5, 3b02915]:
Updated dependencies [`15cad03`, `026e058`, `731b33a`, `e1b5b4b`, `5b1b930`, `6e7d37d`, `d669088`, `15cad03`, `c7aede7`, `0aa8fa5`]:
The Vite plugin now converts the Miniflare options it creates for dev and preview sessions to Miniflare's config-based workers shape.
#14994 2194f88 Thanks @emily-shen! - Update dev and preview for Miniflare's config-based options
The Vite plugin now converts the Miniflare options it creates for dev and preview sessions to Miniflare's config-based workers shape.
Users should not expect to notice any changes.
Updated dependencies [6dbd192, 2194f88, 2194f88, 2194f88, 2194f88, 2194f88, 2194f88, 2194f88]:
Every tail event was written to the trace store as its own Durable Object call, so a request paid two or three round-trips per span. On a module-heavy
#15015 a60ff4d Thanks @nickpatt! - Cut the per-request cost of local observability capture
Every tail event was written to the trace store as its own Durable Object call, so a request paid two or three round-trips per span. On a module-heavy app under the Vite plugin that dominated dev request latency. Rows are now buffered and written in batches, taking a request from roughly thirty calls to three.
Work in progress still shows up as it happens: the root span is written immediately, console logs and exceptions as they arrive, and a span's completion is written on the next event once 100ms has passed. An invocation that goes completely quiet writes nothing further until it ends, since the flush is driven by tail events rather than a timer.
The Vite plugin's own router, asset and proxy workers are also no longer captured. Their traces were noise the Observability views already hid, and skipping them cuts the spans recorded per request — a side benefit being that a trace's root is now your Worker rather than __router-worker__.
Updated dependencies [35c87e9, b4f0c97, 8cf78c8, a60ff4d, 99eb50c, 35c87e9]:
console.log messages now render the way the console would (JSON-encoded strings are unwrapped and multi-argument logs are joined), traces and events c
#14941 266172b Thanks @nickpatt! - Improve the Local Explorer's Observability views
console.log messages now render the way the console would (JSON-encoded strings are unwrapped and multi-argument logs are joined), traces and events can be looked up by trace or span id from the search bar, and an event's "View trace" button jumps to the exact invocation that emitted it — even when a trace_id spans several invocations (e.g. a subrequest or self fetch).
#14996 ebd1dfd Thanks @nickpatt! - Surface Local Explorer API to headless agents
When a Vite dev or preview server with the Cloudflare plugin is started in a headless AI agent environment, the plugin now prints the Local Explorer API URL and useful resource routes to stdout so agents can discover and call them programmatically.
wrangler dev and the Vite plugin now capture request traces and console logs into the Local Explorer's Observability tab out of the box — previously t
#14944 a249591 Thanks @nickpatt! - Enable local observability capture by default in dev
wrangler dev and the Vite plugin now capture request traces and console logs into the Local Explorer's Observability tab out of the box — previously this was opt-in behind X_LOCAL_OBSERVABILITY=true. Set X_LOCAL_OBSERVABILITY=false to opt out (for example if the extra per-worker collector/streaming-tail services cause trouble in a multi-process dev-registry setup).
/cdn-cgi/mf/scheduled → /cdn-cgi/local/scheduled (Note /cdn-cgi/mf/scheduled is already deprecated)
#14586 5a56dda Thanks @emily-shen! - Rewrite local testing paths (/cdn-cgi/*)
Miniflare v5 moved its internal local testing endpoints to /cdn-cgi/local/* (and /__cf_local/* for endpoints that must remain reachable over tunnels) to prevent any potential collision with production routes. wrangler dev and the Vite plugin now transparently rewrite the old paths to the new ones, meaning you can continue to use the old paths without issue.
These are the new paths:
/cdn-cgi/handler/scheduled → /cdn-cgi/local/scheduled/cdn-cgi/handler/email → /cdn-cgi/local/email/cdn-cgi/explorer/* → /cdn-cgi/local/explorer/*/cdn-cgi/mf/scheduled → /cdn-cgi/local/scheduled (Note /cdn-cgi/mf/scheduled is already deprecated)/cdn-cgi/mf/stream/* → /__cf_local/stream/*/cdn-cgi/mf/imagedelivery/* → /__cf_local/imagedelivery/*Updated dependencies [5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda]:
Updated dependencies [`01d7020`, `beec0fb`, `48f0c6c`, `8049ca4`, `d7f38c3`, `1394867`, `cc54478`, `5c25cfe`, `b21eac2`, `bb09f1b`, `1f61001`, `01d702
b21eac2 Thanks @jamesopstad! - The experimental build output directory now includes the Worker's configuration at .cloudflare/output/v0/workers/default/config.json instead of .cloudflare/output/v0/workers/<worker-name>/worker.config.jsonNote that this feature is experimental and subject to change.
#14883 76e6014 Thanks @jamesopstad! - Serve the bundled client HTML in dev when Vite's experimental.bundledDev is enabled
Note that this feature is experimental and subject to change.
#14862 c232d05 Thanks @petebacondarwin! - Destroy the client socket instead of crashing when a WebSocket upgrade fails
If dispatchFetch rejected while a WebSocket upgrade was still in flight (for example when Miniflare is disposed during a dev server shutdown or restart), the error escaped the async upgrade handler as an unhandled rejection. This could terminate the dev server process and leaked the client socket. The upgrade handler now catches such failures and tears the socket down cleanly.
#14837 de6a951 Thanks @1rgs! - Fix compatibility with Vite's experimental.bundledDev option. Keep Miniflare, containers, and tunnels alive when a build runs in dev.
The plugin used the buildEnd hook as its signal that the dev server was closing, and tore down its dev resources there. Vite's experimental.bundledDev runs a build pass during serve, which fires buildEnd while the dev server is still live — so Miniflare was disposed (the next request failed with Expected \miniflare` to be defined`), locally-built container images were removed, and any active tunnel was closed, all mid-serve.
During serve, these resources are now torn down from a patched server.close. We will replace server patching with first-class APIs when they are added to Vite.
#14851 fb89b72 Thanks @exKAZUu! - Retry transient module-transport failures in the runner worker
Each fetchModule invoke was a single fetch to the dev server with no retry. If that one fetch failed transiently (e.g. Network connection lost when workerd reuses a loopback connection that Node just closed), Vite's module runner cached the rejection and every request importing the affected module failed for the rest of the dev session. The invoke is an idempotent request for module code, so retry it up to three times before giving up.
Updated dependencies [773ead4, 773ead4, 09b8a44, 4dfb96e, 1035f74, e426cb9, 3a22ae5, 465c0fb, 465c0fb, e8b3a9d, 552bcfc, b737676, 6e0bf6e]:
wrangler dev and the Vite plugin now capture a trace for every local Worker invocation - spans, logs, and console.* output, including requests that cr
#14633 3203b5d Thanks @nickpatt! - Add local-dev observability
wrangler dev and the Vite plugin now capture a trace for every local Worker invocation - spans, logs, and console.* output, including requests that cross worker or Durable Object boundaries.
You can explore this data two ways:
/cdn-cgi/explorer/api/local/observability/query, discoverable via the Local Explorer's OpenAPI document, so coding agents and tools can query the same spans and logs tables.While this is in testing it's off by default; set X_LOCAL_OBSERVABILITY=true to turn it on. It will be on by default in the public release.
#14792 c4bacec Thanks @matthewp! - Recover local development after the Workers runtime crashes
Previously, an unexpected workerd crash left Miniflare running but unable to serve subsequent requests. Miniflare now restarts workerd after post-startup crashes, while continuing to surface startup crashes as fatal errors.
The Cloudflare Vite plugin also restarts the Vite development server after workerd recovers so its environments, hot channels, and module runners are recreated.
Updated dependencies [246ce92, c38a2c3, 8416b33, c079ba3, 4683ff8, 95b026e, 02232f3, c4bacec, f8a8c2c, 3203b5d]:
Account-level settings (accountId, complianceRegion) now live in a dedicated, named settings export authored via defineSettings, rather than on the Wo
#14724 a50f73a Thanks @jamesopstad! - Add a settings export to the experimental cloudflare.config.ts config
Account-level settings (accountId, complianceRegion) now live in a dedicated, named settings export authored via defineSettings, rather than on the Worker config. A cloudflare.config.ts can export at most one settings object; the Worker itself is the default export.
// cloudflare.config.ts
import { defineSettings, defineWorker } from "wrangler/experimental-config";
import * as entrypoint from "./src/index.ts" with { type: "cf-worker" };
export const settings = defineSettings({
accountId: "<your-account-id>",
});
export default defineWorker({
name: "my-worker",
entrypoint,
compatibilityDate: "2026-05-18",
});
This is only used behind the experimental new-config path (wrangler --experimental-new-config and the @cloudflare/vite-plugin experimental.newConfig option).
Previously, when a config change made the dev server restart fail — for example because the updated Worker config was invalid — the plugin stopped wat
#14610 e727842 Thanks @martijnwalraven! - Keep watching config changes after a failed dev server restart
Previously, when a config change made the dev server restart fail — for example because the updated Worker config was invalid — the plugin stopped watching config changes entirely: the change handler (covering the Worker config files, local dev vars, and the assets configuration) removed itself before restarting, and only a successfully created server would register a fresh one. Since Vite keeps the current server running when a restart fails, every subsequent config change (including the one that fixes the config) was silently ignored for the rest of the session.
The handler now stays registered and guards against re-entrant restarts instead, so fixing the config restarts the dev server as expected.
#14418 cb30df3 Thanks @matthewdavidrodgers! - Improve routing performance for Workers with assets
Reduce request handling latency by streamlining the router Worker's request path. The loopback infrastructure remains available for future use.
Updated dependencies [34e696d, d39ae01, 3de70df, c79504f, 9f04a7e, 9f04a7e, cb30df3, cb6c3f9, c7dbe1a, 3f3afbb, e6fbc4e, 4e1a7a7, 9f04a7e]:
When using the experimental new config (cloudflare.config.ts), the plugin now appends the Workers runtime types (generated from your compatibility dat
#14652 317ce1f Thanks @jamesopstad! - Append Workers runtime types to the generated types when using experimental.newConfig, with a new types.includeRuntime option
When using the experimental new config (cloudflare.config.ts), the plugin now appends the Workers runtime types (generated from your compatibility date and flags) to worker-configuration.d.ts, alongside the types inferred from your config. This is controlled by a new experimental.newConfig.types.includeRuntime option, which defaults to true.
As part of this change, types are now generated only during vite dev (not vite build), since compatibility settings are resolved from the active dev session. This affects the experimental new config path only.
#14588 eb99ab1 Thanks @emily-shen! - fix: Respect auth profiles when using remote bindings in the Vite plugin
Auth profiles (configured via wrangler auth create and wrangler auth activate) were previously being ignored when using remote bindings with the Vite plugin. This is now fixed.
Note that the profile directory is resolved based on the Vite project root.
#14645 cbdd107 Thanks @jamesopstad! - Fix load time crash on Node.js versions earlier than 22.15
The plugin eagerly imported registerHooks from node:module, which only exists on Node.js v22.15.0+. registerHooks is now read lazily, meaning that missing support is only surfaced when using experimental.newConfig.
Updated dependencies [7692a61, ed33326, 018574b, eb99ab1, cdf3148, 7692a61, 7692a61, 3015320, 899c297, 9da77ac, 317ce1f]:
A step's retries.delay can now be a function that computes the delay per failed attempt, in addition to a static duration. The function receives { ctx
#14535 1b965c5 Thanks @Naapperas! - Support dynamic retry delays for Workflow steps in local dev
A step's retries.delay can now be a function that computes the delay per failed attempt, in addition to a static duration. The function receives { ctx, error } and returns a delay (a number of milliseconds or a duration string like "30 seconds"), and its result is fed into the configured backoff.
await step.do(
"call flaky API",
{
retries: {
limit: 5,
backoff: "constant",
delay: ({ ctx }) => ctx.attempt * 1000,
},
},
async () => {
/* ... */
}
);
The function is invoked once per failed attempt with a 5 second timeout. If it throws, times out, or returns an invalid value, the step fails without further retries.
Updated dependencies [`54f74b8`, `0852346`, `54f74b8`]:
Updated dependencies [`e7e5780`, `d88555e`, `5fd8bee`, `5d9990e`, `bf49a41`, `1ac96a1`, `f416dd9`, `1ca8d8f`, `16fbf81`, `b973ed3`]:
wrangler deploy now accepts an exports map in wrangler.json as a declarative alternative to the legacy migrations array.
#14382 fd92d56 Thanks @petebacondarwin! - Add support for declarative Durable Object exports
wrangler deploy now accepts an exports map in wrangler.json as a declarative alternative to the legacy migrations array.
Each entry in exports is keyed by Durable Object class name. type carries the export kind (currently always "durable-object"); the state field carries the lifecycle and defaults to "created" (live) when omitted:
{
"exports": {
// Provision a new Durable Object class (`MyDO`)
"MyDO": { "type": "durable-object", "storage": "sqlite" },
// Delete Durable Object class (`OldGone`)
"OldGone": { "type": "durable-object", "state": "deleted" },
// Rename a Durable Object class (from `OldName` to `NewName`)
"OldName": {
"type": "durable-object",
"state": "renamed",
"renamed_to": "NewName"
},
"NewName": { "type": "durable-object", "storage": "sqlite" },
// Transfer a Durable Object (`Outgoing`) to a new Worker (`target-worker`)
"Outgoing": {
"type": "durable-object",
"state": "transferred",
"transferred_to": "target-worker"
},
// Prepare to receive the transfer of a Durable Object (`Incoming`) from another Worker (`source-worker`)
"Incoming": {
"type": "durable-object",
"state": "expecting-transfer",
"storage": "sqlite",
"transfer_from": "source-worker"
}
}
}
When a Worker declares Durable Object class bindings but no lifecycle for them (neither a migrations array nor an exports map), wrangler warns and now suggests a declarative exports entry for each class (previously it suggested a legacy migrations block).
The deployment response now surfaces the server's reconciliation result — created namespaces, applied tombstones, structured per-scenario info entries, and a removable_entries hint for stale tombstones that are safe to delete from the config. Blocking errors return the structured per-class detail with scenario tags, suggested remediation, and any referencing-script context.
wrangler versions upload also forwards exports. Declarative exports lifecycle changes are reconciled when the version is deployed (wrangler versions deploy or wrangler deploy), so a versions upload payload can declare new classes in exports without immediately provisioning them. An actor binding (durable_objects.bindings) to a class declared only in exports on the same versions upload is rejected with a clear error (code 100406) — the binding cannot be resolved until the namespace is provisioned. Either stage the new class via ctx.exports.X (no binding required) on versions upload and add the binding at deploy time, or use wrangler deploy to provision and bind in one step (the same constraint applies to the migrations flow).
Multi-version deploys (wrangler versions deploy A@50% B@50%) where the selected versions disagree on declarative exports are rejected server-side with a clear message: deploy the version that changes exports at 100% first, then run the percentage-split deploy. This prevents traffic on one branch routing to code that references unprovisioned or just-deleted DO namespaces. Single-version (100%) deploys are unaffected.
Local development (wrangler dev, vite dev and unstable_startWorker) reads Durable Object SQLite storage settings from the new exports field, so applications using the declarative flow get correct local-dev storage without needing to also declare a migrations block.
@cloudflare/vitest-pool-workers also picks up Durable Object configuration from exports, so tests against an exports-only Worker run with the correct local SQLite storage and can reach unbound Durable Object classes via ctx.exports.X.
wrangler types is also aware of exports. Live entries (including expecting-transfer, the receiving side of a two-phase transfer) are added to Cloudflare.GlobalProps.durableNamespaces, which types ctx.exports.X for unbound Durable Objects declared only via exports.
When a Worker config with a D1 binding is built by the Vite plugin, the generated wrangler.json now points migrations_dir back to the source migration
#14490 75d8cb0 Thanks @petebacondarwin! - Preserve D1 migration paths in generated Worker configs
When a Worker config with a D1 binding is built by the Vite plugin, the generated wrangler.json now points migrations_dir back to the source migration directory. This lets tools that read the generated config, such as createTestHarness(), find the same D1 migrations as the source Worker config.
Updated dependencies [75d8cb0, 75d8cb0, 75d8cb0, 75d8cb0, 75d8cb0, f10d4ad, 75d8cb0, 75d8cb0, 75d8cb0, 75d8cb0, d292046, 75d8cb0, 75d8cb0, 75d8cb0, 75d8cb0, 75d8cb0, 75d8cb0, e0cc2cb, 75d8cb0, 75d8cb0, 75d8cb0]:
Your coding agent can read these notes before it upgrades. Set up the MCP server →