Cloudflare unveils vinext, a Vite-based Next.js rival
Cloudflare has released vinext, a Vite-based framework that reimplements the Next.js API surface and deploys to Cloudflare Workers with a single command. It positions vinext as an alternative to adapter-based approaches for running Next.js on non-Vercel serverless platforms.
Vinext is pitched as a drop-in replacement for many Next.js applications. Developers install it via npm, replace "next" with "vinext" in scripts, and keep familiar structures such as app/, pages/, and next.config.js. It includes separate commands for development, production builds, and deployment to Workers.
Deployment friction
Next.js is widely used across the React ecosystem, but teams deploying to other serverless environments often face extra work. Next.js relies on its own build toolchain, including Turbopack, and its output often needs reshaping for other platforms.
Tooling such as OpenNext has filled this gap by adapting Next.js build output for other runtimes. Cloudflare has contributed engineering effort to OpenNext and has also worked with the Next.js team on an adapters API, though that effort remains in an early stage.
Cloudflare argues that adapters can be brittle because they depend on reverse-engineering build output that may change between versions. It also points to local development constraints: the standard next dev workflow runs in Node.js, which can complicate testing for applications that rely on platform-specific services.
Vite foundation
Vinext takes a different approach. Instead of wrapping Next.js output, it reimplements the Next.js API surface as a Vite plugin. Cloudflare says this includes routing, server-side rendering, React Server Components, server actions, caching, and middleware.
Portability is also a design goal. Vite output can run across platforms via the Vite Environment API. Workers is the first deployment target, with additional targets potentially coming through partner contributions.
Benchmark results
Cloudflare's early benchmarks compare vinext with Next.js 16 using a 33-route App Router application. The methodology disables TypeScript type checking and ESLint in Next.js builds, and uses force-dynamic to avoid pre-rendering static routes, which can affect build times. Cloudflare says the focus is compilation and bundling speed, not serving performance.
In these tests, the mean production build time for Next.js 16.1.6 with Turbopack was 7.38 seconds. Vinext measured 4.64 seconds using Vite 7 and Rollup, and 1.67 seconds using Vite 8 and Rolldown. Cloudflare describes this as 1.6x to 4.4x faster than the Next.js baseline under the specific fixture and conditions.
The same comparison reported smaller gzipped client bundles: 168.9 KB for Next.js, 74.0 KB for vinext with Rollup, and 72.9 KB with Rolldown. Cloudflare characterises this as a 56% to 57% reduction in the fixture.
Cloudflare cautions that the test application is not representative of all production apps and describes the results as directional.
Workers deployment
Vinext includes a deploy command that builds the app, generates Workers configuration, and publishes the Worker. Cloudflare says both the App Router and Pages Router run on Workers, including client-side hydration and navigation.
For caching, Cloudflare says vinext includes a KV cache handler that provides Incremental Static Regeneration (ISR) behaviour. It describes the caching layer as pluggable, with options such as R2 depending on payload size and access patterns. Cloudflare also says it is working on Cache API improvements to reduce configuration.
The project is marked experimental. Cloudflare says it is not battle-tested at scale and advises caution for production evaluation. It reports more than 1,700 Vitest tests and 380 Playwright end-to-end tests, with 94% coverage of the Next.js 16 API surface.
Cloudflare also points to early production use, saying National Design Studio is running vinext in production on a beta site for CIO.gov.
Pre-rendering approach
Vinext supports ISR but does not yet support static pre-rendering at build time, a common Next.js option for pages without dynamic data. Cloudflare says this was an intentional launch decision and has put static pre-rendering on the roadmap.
Instead, Cloudflare introduced an experimental feature it calls Traffic-aware Pre-Rendering. It uses Cloudflare zone analytics at deploy time to pre-render a subset of pages based on recent traffic patterns. Pages outside that set fall back to on-demand server-side rendering and then use ISR caching after the first request, according to Cloudflare.
Cloudflare frames the approach as a response to large sites where pre-rendering tens of thousands of pages can make builds scale linearly with page count.
AI-led build
Cloudflare says vinext was developed in under a week by a single engineer directing an AI model. It estimates the work consumed about $1,100 in API tokens over more than 800 OpenCode sessions. Cloudflare says almost every line of code was written by AI, with human oversight covering architecture decisions, prioritisation, and corrections when behaviour diverged from Next.js.
Cloudflare also describes an automated workflow combining AI-assisted implementation, test execution, and AI agents for code review. It says the project runs continuous integration with type checking and linting, alongside unit and end-to-end tests.
"When you give AI good direction, good context, and good guardrails, it can be very productive. But humans still have to steer."
Workers remains the current deployment target, but Cloudflare describes most of the code as pure Vite and says it is discussing adoption with other hosting providers. It also describes a Vercel proof-of-concept that it says was completed in less than 30 minutes.