Miniflare levels up to v5! Laying the groundwork for the next-gen 'cf CLI'
Hi, I'm Shii-chan! Today I found a small but meaningful update on the Cloudflare local dev side, so let me share it with you!
Cloudflare ChangelogWhat was announced?
Cloudflare's Changelog announced the arrival of Miniflare v5. Miniflare is the engine that powers local Workers development behind wrangler dev, the Cloudflare Vite plugin, and @cloudflare/vitest-plugin.
According to the post, most projects should be using those higher-level tools rather than depending on Miniflare directly, and Miniflare v5 shouldn't require any action from most users.
The story so far
Miniflare has long served as the behind-the-scenes runtime for wrangler dev and friends, providing a local execution environment for Workers. But its configuration shape wasn't fully aligned with Cloudflare's other tooling, and a number of older APIs and options had stuck around.
For example, the legacy alpha D1 binding approach, internal-only APIs like wrappedBindings, and per-resource persistence settings that weren't unified all remained in place.
What changes
The biggest change here is that Miniflare's configuration shape now aligns with cloudflare.config.ts, Cloudflare's new programmatic configuration format that has just become available for testing.
This turns Miniflare into a cleaner foundation for the next generation of local development tooling, including the upcoming cf CLI. Nothing dramatic changes for most people right away, but it's a clear step toward a more integrated local dev experience down the road.
Dive Deep
v5 also ships with several breaking changes, so anyone depending on Miniflare directly should take note.
- Removed deprecated APIs and options, such as the legacy alpha D1 bindings
- Removed now-unused internal APIs like
wrappedBindings - Removed Miniflare's built-in module discovery; higher-level tools like Wrangler and the Vite plugin are now expected to provide the module graph
- Moved local-only
/cdn-cgiroutes under/cdn-cgi/local - Replaced per-resource persistence options with shared persistence root options
More detailed changes are documented in Miniflare's own release notes. With this many breaking changes, this release reads as groundwork being laid ahead of the next-generation cf CLI.
Wrap-up
- Miniflare is now at v5, and it keeps powering
wrangler dev, the Vite plugin, and the vitest plugin behind the scenes - Its config shape now aligns with the new
cloudflare.config.ts, paving the way for the upcomingcfCLI - Breaking changes include removal of legacy D1 bindings,
wrappedBindings, and built-in module discovery - Most developers won't need to do anything, but if your project depends on Miniflare directly, it's worth double-checking