SYSTEM Cited by 1 source
vinext¶
vinext ("vee-next", github.com/cloudflare/vinext)
is a drop-in replacement for Next.js
built on top of Vite as a plugin, deployable
to Cloudflare Workers with a
single vinext deploy command. Announced 2026-02-24, ~1 week
after the first commit.
npm install vinext
# replace "next" with "vinext" in package.json scripts
vinext dev # HMR dev server
vinext build # production build
vinext deploy # build + deploy to Cloudflare Workers
Existing app/, pages/, and next.config.js work as-is.
Architecture¶
vinext is not a wrapper around Next.js / Turbopack output — contrast OpenNext. It is a clean reimplementation of the Next.js API surface as a Vite plugin: routing, server rendering, React Server Components, server actions, caching, middleware, file-system routing. ~95 % is pure Vite — none of it Cloudflare-specific. Canonical wiki instance of patterns/clean-reimplementation-over-adapter.
Deployment¶
- Primary target: Cloudflare Workers. Both App Router and Pages Router supported. Full client-side hydration, interactive components, client-side navigation, React state.
- Cross-platform by Vite: Vite output runs on any platform via the Vite Environment API. PoC on Vercel took "less than 30 minutes."
- Cloudflare Agents live example: next-agents.threepointone.workers.dev
runs inside
workerdduring both dev and deploy — Durable Objects, AI bindings, and all Cloudflare-specific services available withoutgetPlatformProxyworkarounds.
Caching¶
Production caching for ISR is pluggable via setCacheHandler():
import { KVCacheHandler } from "vinext/cloudflare";
import { setCacheHandler } from "next/cache";
setCacheHandler(new KVCacheHandler(env.MY_KV_NAMESPACE));
KVCacheHandler is the
default for most applications. R2
fits apps with large cached payloads. A forthcoming
Cache-API-based alternative is named as roadmap. Canonical
wiki instance of patterns/pluggable-cache-handler.
Traffic-aware Pre-Rendering (TPR)¶
vinext deploy --experimental-tpr queries
Cloudflare zone
analytics at deploy time and pre-renders only the URLs
covering 90 % of real traffic. Example deploy log from the
launch post:
Building...
Build complete (4.2s)
TPR (experimental): Analyzing traffic for my-store.com (last 24h)
TPR: 12,847 unique paths — 184 pages cover 90% of traffic
TPR: Pre-rendering 184 pages...
TPR: Pre-rendered 184 pages in 8.3s → KV cache
Deploying to Cloudflare Workers...
Resolves
build time
scales linearly with generateStaticParams() without
coupling the build to the production database. Everything
not pre-rendered falls back to on-demand SSR + ISR. Canonical
wiki instance of concepts/traffic-aware-prerendering +
patterns/traffic-aware-prerendering.
Benchmarks¶
33-route App Router fixture; Next.js configured with
TypeScript + ESLint disabled and force-dynamic to isolate
bundler + compilation time. Public methodology +
historical results at
benchmarks.vinext.workers.dev.
| Framework | Build time | Gzipped bundle |
|---|---|---|
| Next.js 16.1.6 (Turbopack) | 7.38 s | 168.9 KB |
| vinext (Vite 7 / Rollup) | 4.64 s (1.6×) | 74.0 KB (56 % smaller) |
| vinext (Vite 8 / Rolldown) | 1.67 s (4.4×) | 72.9 KB (57 % smaller) |
Measures compilation + bundling only, not serving performance. "Take them as directional, not definitive."
Testing + quality gates¶
"Almost every line of code in vinext was written by AI. But every line passes the same quality gates you'd expect from human-written code."
- 1,700+ Vitest unit tests
- 380 Playwright E2E tests
- Tests ported from Next.js's own repo (attribution preserved) and OpenNext's Cloudflare conformance suite.
- 94 % API coverage of Next.js 16.
- Type checking via tsgo; linting via oxlint. CI runs all of it on every PR.
- AI-agent code review on opened PRs; second agent addresses review comments. Browser-level testing via agent-browser.
- Verified against the Next.js App Router Playground.
Canonical wiki instance of concepts/ai-agent-guardrails.
Build-cost numbers¶
- ~$1,100 in Claude API tokens for the whole project.
- 800+ sessions in OpenCode.
- First commit 2026-02-13; basic App + Pages Router SSR +
middleware + server actions + streaming same evening; App
Router Playground rendering 10/11 routes day 2;
vinext deployworking day 3; remainder of week spent hardening. - One engineer (engineering manager) directing AI.
Migration¶
Install via Agent Skill:
Then in any supported AI coding tool (Claude Code, OpenCode, Cursor, Codex, …): "migrate this project to vinext." The skill handles compatibility check, dependency install, config generation, dev-server startup. Canonical wiki instance of patterns/migration-as-agent-skill.
Manual path:
What's not supported (yet)¶
- Static pre-rendering at build time (Next.js's
generateStaticParams()path) — on roadmap. For 100 %-static sites the post recommends Astro. - Full current list: what's not supported and won't be
- known limitations.
Customers¶
- National Design Studio — beta site CIO.gov in production at publication time, "with meaningful improvements in build times and bundle sizes."
Caveats¶
- Experimental, < 1 week old at announcement. "Proceed with appropriate caution" for production.
- Benchmarks measure a single 33-route App Router app, not a representative sample.
- Static-pre-rendering gap is significant for content-heavy sites today.
- TPR is experimental + Cloudflare-specific (requires edge analytics).
@vitejs/plugin-rscis itself "still early."
Seen in¶
- sources/2026-02-24-cloudflare-how-we-rebuilt-nextjs-with-ai-in-one-week — launch + architecture + benchmarks + AI-workflow narrative
- TPR introduction. Canonical source.
Related¶
- systems/nextjs — the reimplementation target.
- systems/vite — the foundation (~95 % of vinext).
- systems/rolldown / systems/rollup — bundlers.
- systems/turbopack — Next.js's bespoke bundler; the benchmark baseline vinext beats.
- systems/vitejs-plugin-rsc — the RSC plugin vinext builds on.
- systems/opennext — the adapter-approach alternative vinext structurally supersedes for Workers.
- systems/cloudflare-workers — primary deployment target.
- systems/cloudflare-kv — default cache substrate via
KVCacheHandler. - systems/vinext-kv-cache-handler — the cache-handler implementation.
- systems/vinext-agent-skill — the migration skill.
- concepts/traffic-aware-prerendering — the signature system-design idea.
- patterns/clean-reimplementation-over-adapter — the structural framing.
- patterns/ai-driven-framework-rewrite — the project-shape framing.
- companies/cloudflare — operator.