wrangler
4.164.0 · 17 Nov 2026MIT OR Apache-2.049.3M / weekRepositoryHomepagenpmAtom feed
4.167.0 is the newest release of 4.x.
In short
3 new6 fixed2 internal
Release note
Minor Changes
Add type generation for AI Search bindings
Running
wrangler typesnow generatesAiSearchNamespaceandAiSearchInstancetypes forai_search_namespacesandai_searchconfig bindings respectively. Both simple and per-environment modes are supported.// wrangler.json { "ai_search_namespaces": [ { "binding": "AI_SEARCH", "namespace": "production" } ], "ai_search": [ { "binding": "BLOG_SEARCH", "instance_name": "cloudflare-blog" } ] }// Generated by `wrangler types` interface Env { AI_SEARCH: AiSearchNamespace; BLOG_SEARCH: AiSearchInstance; }Add experimental headful browser rendering support for local development
Experimental: This feature may be removed or changed without notice.
When developing locally with the Browser Rendering API, you can enable headful (visible) mode via the
X_BROWSER_HEADFULenvironment variable to see the browser while debugging:X_BROWSER_HEADFUL=true wrangler dev X_BROWSER_HEADFUL=true vite dev
Note: when using
@cloudflare/playwright, two Chrome windows may appear — the initial blank page and the one created bybrowser.newPage(). This is expected behavior due to how Playwright handles browser contexts via CDP.Add
vpc_networksbinding support for routing Worker traffic through a Cloudflare Tunnel or network.{ "vpc_networks": [ // Route through a specific Cloudflare Tunnel { "binding": "MY_FIRST_VPC", "tunnel_id": "<tunnel-id>" }, // Route through the Cloudflare One mesh network { "binding": "MY_SECOND_VPC", "network_id": "cf1:network" } ] }
Patch Changes
Display build errors for auxiliary workers in multi-worker mode
Previously, when running
wrangler devwith multiple-cconfig flags (multi-worker mode), build errors from auxiliary/secondary workers were only logged at debug level, causing Wrangler to silently hang. Build errors from all workers are now displayed at error level so you can see what went wrong and fix it.Fix remote proxy worker not catching errors thrown by bindings during
wrangler devFix source phase imports in bundled and non-bundled Workers
Wrangler now preserves
import sourcesyntax when it runs esbuild, including module format detection and bundled deploy output. This fixes both--no-bundleand bundled deployments for Workers that import WebAssembly using source phase imports.Sort D1 migration files to ensure consistent chronological ordering
wrangler d1 migrations listandwrangler d1 migrations applypreviously returned migration files in an order dependent on the filesystem, which could vary across operating systems. Migration filenames are now sorted alphabetically before being returned, ensuring consistent chronological ordering.Polish Cloudflare Vite plugin installation during autoconfig
Projects using Vite 6.0.x were rejected by auto-configuration because the minimum supported version was set to 6.1.0 (the
@cloudflare/vite-pluginpeer dependency). The minimum version check is now 6.0.0, and when a project has Vite in the [6.0.0, 6.1.0) range, auto-configuration will automatically upgrade it to the latest 6.x before installing@cloudflare/vite-plugin.Use today's date as the default compatibility date
Previously, when generating a compatibility date for new projects or when no compatibility date was configured, the date was resolved by loading the locally installed
workerdpackage viaminiflare. This approach was unreliable in some package manager environments (notablypnpm). The logic now simply uses today's date instead, which is always correct and works reliably across all environments.
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.