← Back
Cloudflare
Cloudflare launches vinext, a Next.js alternative on Vite that builds 4.4x faster
Cloudflare Workers · releasefeatureplatformintegrationperformance · blog.cloudflare.com ↗

What is vinext?

vinext is a clean reimplementation of the Next.js API surface built directly on Vite instead of Next.js's proprietary Turbopack toolchain. It's a drop-in replacement—swap next with vinext in your npm scripts and your existing app/, pages/, and next.config.js files continue to work as-is. The entire project runs as a Vite plugin, enabling deployment to any platform, with Cloudflare Workers as the primary target.

Key capabilities

vinext supports:

  • App Router and Pages Router with full client-side hydration
  • React Server Components and server actions
  • Caching and middleware out of the box
  • Single-command deployment to Cloudflare Workers via vinext deploy
  • KV cache handler for Incremental Static Regeneration (ISR)
  • Platform-specific APIs (Durable Objects, KV, AI bindings) testable in dev mode without workarounds

The build is itself a Vite plugin, so the output runs on any platform thanks to Vite's Environment API.

Performance benchmarks

Testing a 33-route App Router application against Next.js 16.1.6:

Production build time:

  • Next.js 16 (Turbopack): 7.38s (baseline)
  • vinext with Rollup: 4.64s (1.6x faster)
  • vinext with Rolldown: 1.67s (4.4x faster)

Client bundle size (gzipped):

  • Next.js 16: 168.9 KB (baseline)
  • vinext with Rollup: 74.0 KB (56% smaller)
  • vinext with Rolldown: 72.9 KB (57% smaller)

Note: These benchmarks measure compilation and bundling speed only on a single 33-route test fixture. Full methodology and historical results are available publicly at benchmarks.vinext.workers.dev.

Addressing Next.js deployment pain

The motivation stems from longstanding challenges with Next.js in serverless environments. Today, adapters like OpenNext attempt to reshape Next.js's proprietary build output for platforms like Cloudflare, Netlify, and AWS Lambda—a fragile process that breaks between versions. Even with Next.js's forthcoming adapters API, the foundation remains bespoke Turbopack, and dev mode (next dev) runs exclusively in Node.js, preventing testing of platform-specific features.

By building on Vite, vinext enables native deployment to multiple platforms with a unified dev and build experience.

Getting started

npm install vinext
vinext dev      # Development with HMR
vinext build    # Production build
vinext deploy   # Deploy to Cloudflare Workers

Live examples include an App Router playground, Hacker News clone, and examples demonstrating Cloudflare Agents integration—features previously requiring workarounds like getPlatformProxy.