Cloudflare Rebuilt Next.js with AI in One Week — for $1,100
Cloudflare's vinext is a drop-in replacement for Next.js built on Vite, created by one engineer and an AI in seven days. It builds 4x faster, produces 57% smaller bundles, and deploys to Cloudflare Workers with a single command.
Last week, Cloudflare quietly dropped a story that stopped the web dev community in its tracks: one engineer, working alongside an AI model, rebuilt Next.js from scratch — in seven days — for roughly $1,100 in token costs. The result is vinext, an open-source, drop-in replacement for Next.js built on Vite, and it's already running in production for real customers.
The Problem With Next.js Deployment
Next.js is the dominant React framework. Millions of developers rely on it, and for good reason — the developer experience is excellent. But Next.js has a deployment problem outside of Vercel.
Because the framework uses its own bespoke toolchain (Turbopack), deploying to platforms like Cloudflare Workers, Netlify, or AWS Lambda requires reshaping the build output into something those platforms can actually run. This is exactly what OpenNext was built to solve — and while it works, it's a fragile game of whack-a-mole. Every new Next.js version risks breaking the carefully reverse-engineered adapter code.
Even with an official adapters API in progress, another limitation remains: next dev runs exclusively in Node.js. If your app uses platform-specific APIs like Cloudflare Durable Objects, KV, or AI bindings, you can't test that code locally without workarounds.
Enter vinext: A Clean Reimplementation
Cloudflare's answer was radical: instead of adapting Next.js output, why not reimplement the Next.js API surface on top of Vite?
Vite is already the foundation for most of the front-end ecosystem — Nuxt, SvelteKit, Astro, Remix. It's fast, well-understood, and targets multiple runtimes via its Environment API. A Next.js-compatible framework built on Vite would natively run anywhere Vite runs.
The team wasn't sure it would work. They did it anyway, and the results exceeded expectations.
npm install vinext
Replace next with vinext in your package.json scripts — that's it. Your existing app/, pages/, and next.config.js work as-is. Full support for App Router, React Server Components, server actions, middleware, and caching, all implemented from scratch as Vite plugins.
Deploying to Cloudflare Workers takes one additional command:
vinext deploy
The Numbers Are Striking
Benchmarks comparing vinext against Next.js 16 on a shared 33-route App Router application show meaningful gains:
- Production build time: up to 4x faster
- Client bundle size: up to 57% smaller
These numbers were measured under controlled conditions — TypeScript type checking and ESLint disabled in both, force-dynamic set to isolate bundler performance. The benchmarks run automatically on GitHub CI with every merge to main.
$1,100 and One Week
The headline number — $1,100 in AI token costs — is the part that has the developer world buzzing. It's not just that the project succeeded; it's what it signals about the cost of building software in 2026.
A framework-level reimplementation, covering routing, SSR, RSC, server actions, and caching, used to be multi-year, multi-team engineering work. The fact that one engineer with an AI collaborator could produce a working, production-capable version in a week at a coffee-table budget is a genuine inflection point — not just for Cloudflare, but for how the industry thinks about open-source maintenance and platform portability.
What This Means for the Vite Ecosystem
For developers using Nuxt, SvelteKit, or Astro — all Vite-based frameworks — vinext is a validation of a bet they already made. The Vite ecosystem's runtime-agnostic approach is now demonstrably capable of running code that was previously gated behind a proprietary toolchain.
For teams locked into Next.js but wanting to move to Cloudflare's global infrastructure, vinext offers a migration path that requires no rewrite — just swapping a dependency.
The project is fully open source at github.com/cloudflare/vinext. Cloudflare has framed it as a serious effort, not an experiment: it's already in production, benchmarks are automated, and the original blog post was updated with corrected numbers within hours of publication.
Whether vinext becomes the standard way to run React on Cloudflare — or spurs the Next.js team to accelerate their own adapter story — the pressure is now real, and the cost argument is impossible to ignore.
Sources: