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 2 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
Nothing published for this version
Updated dependencies [ 7f0734c ]:
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]:
The admin API it returns is backed by RPC stubs. Its type left out Symbol.dispose and the documented example never released them, so a test that follo
#15706 f5341a4 Thanks @Om-singhaI! - Declare the adminSecretsStore() result as disposable and show using in its example
The admin API it returns is backed by RPC stubs. Its type left out Symbol.dispose and the documented example never released them, so a test that followed it made workerd warn that an RPC stub was not disposed properly. using admin = adminSecretsStore(env.MY_SECRET) now type checks and releases the stubs at the end of the scope.
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 ]:
Experimental cloudflare.config.ts files now define settings and resources together in a default-exported defineConfig() call. Add a Worker under worke
#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,
},
});#15707 95af41d Thanks @halfstack-dev! - Support nested D1 migration layouts in readD1Migrations()
readD1Migrations() now accepts the same migrationsDir / migrationsPattern options Wrangler uses, so Vitest can apply Drizzle-style nested files such as 0001_init/migration.sql. Discovery is shared with Wrangler via @cloudflare/workers-utils, so the test path and wrangler d1 migrations apply stay aligned.
The original readD1Migrations(migrationsPath) signature still reads only top-level *.sql files in that directory.
Updated dependencies [ 412c79e , 92874f6 , fe265f8 ]:
412c79e, 92874f6, fe265f8]:
Add @cloudflare/codemod package with internal AST-based codemod utilities ( parseJs , parseTs , parseFile , transformFile , mergeObjectProperties ) bu
#13102 e200179 Thanks @dario-piotrowicz! - First release of new package
Add @cloudflare/codemod package with internal AST-based codemod utilities (parseJs, parseTs, parseFile, transformFile, mergeObjectProperties) built on recast.
#15117 f0c9c66 Thanks @edmundhung! - Support Workerd's new module registry in Workers Vitest tests
The pool now follows Workerd's V2 module fallback protocol when new_module_registry is selected while retaining the V1 path for legacy_module_registry. Tests using the new registry preserve URL-based import.meta behavior and load CommonJS dependencies as native CommonJS modules with named exports.
#15272 c921b3f Thanks @penalosa! - Add an experimental newConfig option for loading the Worker's configuration from cloudflare.config.ts
Projects that have migrated to the new TypeScript configuration format had no way to run their Vitest suite against their real bindings, since there was no Wrangler configuration file left to point wrangler.configPath at. This adds the missing option, modelled on @cloudflare/vite-plugin's experimental.newConfig:
import { cloudflareTest } from "@cloudflare/vitest-plugin";
import { defineProject } from "vitest/config";
export default defineProject({
plugins: [cloudflareTest({ experimental: { newConfig: true } })],
});newConfig: true loads cloudflare.config.ts from the project root; pass { configPath: "..." } to load it from elsewhere. Config functions are called with ctx.mode set to Vite's mode, which defaults to "test" and can be overridden with --mode. experimental.newConfig cannot be combined with wrangler.
This is experimental and may change without a major version bump. Wrangler environments, wrangler.config.ts tooling configuration, and type generation are not supported yet.
#15293 7a9b8a7 Thanks @thatsKevinJain! - Fix "Network connection lost" when multiple test files use remote bindings
Remote proxy sessions are shared across pool workers by Wrangler config path, but were disposed during each test file's teardown. Because Vitest starts the next file's worker before the previous one finishes stopping, later files reused an already-disposed session and failed with "Network connection lost". Sessions are now disposed only once the last pool worker stops.
Updated dependencies [aa54b49, 4a67a28, 2d78137, 04e8564, d1cc3af, 693ca29, 693ca29, 693ca29, daefb3c, 37ed753, f76b68e, ad89456, c809851, c66d2d5, 693ca29, 74de3ab, 0cb8690, 9fcb1c9, 22182da, a4c3458, 433fa98, d589d30, dd5148d, 82d11fc]:
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
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
The package has been renamed from @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin to be clearer about it's usage.
#15074 bfcc442 Thanks @penalosa! - Rename @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin for the v1 release
The package has been renamed from @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin to be clearer about it's usage.
To migrate, run the codemod from the root of your project:
npx @cloudflare/codemods vitest:pool-workers-to-vitest-pluginThis handles the whole rename for you:
package.json, moving plain version ranges to ^1.0.0 while preserving workspace:/catalog:/link:/file: protocol references, along with any overrides, resolutions and pnpm.overrides entries.import { cloudflareTest } from "@cloudflare/vitest-pool-workers" to import { cloudflareTest } from "@cloudflare/vitest-plugin", preserving any subpaths.types entry in your test tsconfig.json from @cloudflare/vitest-pool-workers/types to @cloudflare/vitest-plugin/types.Pass --dry-run to preview the changes first, or --files <glob> to restrict which files are considered.
If you would rather migrate by hand, the only changes needed are the dependency name in package.json, the package specifier in any import/require of the plugin, and the types entry in your test tsconfig.json.
#14690 d81fae7 Thanks @penalosa! - Add a central CLI for Cloudflare codemods
Run a codemod by name, e.g. npx @cloudflare/codemods vitest:v3-to-v4. The initial migrations cover Vitest v3 to v4 configuration (vitest:v3-to-v4) and the @cloudflare/vitest-pool-workers to @cloudflare/vitest-plugin v1 rename (vitest:pool-workers-to-vitest-plugin). The existing Vitest transform now lives in this dedicated package.
Updated dependencies [`8cf78c8`, `6946da1`]:
Updated dependencies [`b5c083b`]:
b5c083b]:
Updated dependencies [`5a56dda`]:
5a56dda]:
Updated dependencies [`5e6556a`]:
5e6556a]:
Updated dependencies [`552bcfc`]:
552bcfc]:
Updated dependencies [`2b390d7`, `a6c214f`]:
C3 resolves the invoking package manager with which-pm-runs, which already returns nub, but detectPackageManager had no nub case in its switch, so it
#14499 8cd805d Thanks @colinhacks! - Detect the nub package manager
C3 resolves the invoking package manager with which-pm-runs, which already returns nub, but detectPackageManager had no nub case in its switch, so it fell through to the npm default and produced npm commands. detectPackageManager now maps nub to its nub/nubx executables, and @cloudflare/cli-shared-helpers's package-install helpers accept nub as a package manager.
Updated dependencies []:
Updated dependencies [`42df9bb`]:
42df9bb]:
Updated dependencies [`0283a1f`]:
0283a1f]:
Updated dependencies [`aad35b7`, `1ac96a1`, `1ca8d8f`]:
Updated dependencies [`aa5d580`]:
aa5d580]:
Updated dependencies [`cfd6205`, `cfd6205`]:
Updated dependencies [`673b09e`, `5dfb788`]:
Updated dependencies [`ecfdd5a`]:
ecfdd5a]:
Updated dependencies [ b00ef4f , 9d7b08e , 464a582 ]:
Updated dependencies [`8cd805d`]:
8cd805d]:
Updated dependencies [`42df9bb`]:
42df9bb]:
Updated dependencies [`0283a1f`]:
0283a1f]:
vite+ installs @voidzero-dev/vite-plus-core under the vite npm alias, so the resolved node_modules/vite/package.json reports the wrapper's own version
#14548 383e679 Thanks @petebacondarwin! - Fix Vite version detection for vite+ projects during autoconfiguration
vite+ installs @voidzero-dev/vite-plus-core under the vite npm alias, so the resolved node_modules/vite/package.json reports the wrapper's own version (e.g. 0.2.2) rather than the underlying Vite version it bundles. This caused autoconfiguration to fail with an error claiming the Vite version was too old to be configured automatically. Autoconfiguration now detects the correct underlying Vite version for these projects.
Updated dependencies [aad35b7, 1ac96a1, 1ca8d8f]:
Updated dependencies [`6529f0c`]:
6529f0c]:
aa5d580]:
Updated dependencies [`2194f88`]:
2194f88]:
Provides both a programmatic API and a CLI (pages-functions build) for converting a Cloudflare Pages functions/ directory into a Cloudflare Workers bu
#14785 5e6556a Thanks @dario-piotrowicz! - Publish helpers for compiling Pages Functions directories into Workers bundle
Provides both a programmatic API and a CLI (pages-functions build) for converting a Cloudflare Pages functions/ directory into a Cloudflare Workers bundle:
npx @cloudflare/pages-functions build ./functions --outdir ./dist
The package compiles the Worker and its auxiliary modules, but does not deploy them or generate deployment configuration. Consumers must provide the appropriate Wrangler configuration, including the selected fallback service binding (ASSETS by default) when applicable.
#14928 f05a0de Thanks @dario-piotrowicz! - Improve asset directory error messages in Pages Functions builds
Previously, when an imported asset directory was invalid, a single error message was shown: '<path>' does not exist or is not a directory. This has been split into two distinct, actionable messages:
'<path>' does not exist. Please create the directory or check the path and try again.'<path>' is not a directory. Please provide a path to a valid directory.b21eac2 Thanks @jamesopstad! - Move build output utils to new @cloudflare/build-output-utils packageb21eac2]:
#15789 1c96111 Thanks @jamesopstad! - Publish @cloudflare/runtime-types as a standalone package
Consumers can now share the runtime type generator used by Wrangler and the Cloudflare Vite and Vitest integrations.
This package is not yet stable enough for external use — APIs may change without notice.
Updated dependencies [`b4f0c97`, `8cf78c8`, `a60ff4d`, `6946da1`, `99eb50c`]:
Updated dependencies [`b5c083b`, `9c74538`, `a88d169`, `a88d169`, `daf65f2`, `a9e5abb`]:
Updated dependencies [`cec9d88`]:
cec9d88]:
Updated dependencies [`5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dda`, `5a56dd
5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda, 5a56dda]:
Updated dependencies [`01d7020`, `48f0c6c`, `8049ca4`, `d7f38c3`, `5c25cfe`, `5e6556a`, `1f61001`]:
Updated dependencies [`773ead4`, `773ead4`, `1035f74`, `e426cb9`, `3a22ae5`, `465c0fb`, `552bcfc`, `6e0bf6e`]:
Your coding agent can read these notes before it upgrades. Set up the MCP server →