Cloudflare unveils AI-assisted Next.js alternative
Cloudflare released 'vinext,' a Next.js alternative built with AI, boasting 4.4x faster build speeds, but lacking key features like static pre-rendering.
The Cloudflare engineer who developed vinext used AI to write most of the code, focusing on architecture and testing. Over 800 AI sessions resulted in code that passed 1,700+ Vitest unit tests and 380 Playwright end-to-end tests. Vinext implements key Next.js features like routing, server rendering, React Server Components, and middleware as a Vite plugin. It also includes 33 shims to cover all next/* import paths, so developers don't have to change their code. A key difference between vinext and Next.js is that vinext uses Vite and its plugin ecosystem, whereas Next.js relies on Turbopack. Cloudflare says that vinext is an alternative implementation of the Next.js API, not a fork. Instead of pre-rendering everything, vinext offers Traffic-aware Pre-Rendering (TPR), which is currently experimental. TPR uses Cloudflare's zone analytics to identify and pre-render only the most visited pages. While promising, vinext is still experimental and hasn't been tested at scale. Some developers have raised concerns about maintainability, given the heavy reliance on AI-generated code.