vinextexperimental
How we rebuilt Next.js with AI in one week·Read the announcement →

The Next.js API surface,
reimplemented on Vite.

Drop-in replacement for Next.js. Your existing app/, pages/, and next.config.js work as-is. Builds up to 4.4× faster, 57% smaller bundles. Deploys to Cloudflare Workers in one command.

$npx skills add cloudflare/vinext
terminal
$ vinext dev
▲ vinext 0.1.0 ready on http://localhost:3000
$ vinext build
Build complete
Client bundle: 74.0 KB (gzipped)
$ vinext deploy
Deploying to Cloudflare Workers... ✓ deployed
4.4×
faster builds
vs Next.js 16 with Vite 8 / Rolldown
57%
smaller bundles
gzipped client bundle vs Next.js 16
94%
API coverage
of the Next.js 16 API surface
2,080+
tests
Vitest + Playwright E2E
Compatibility

94% of Next.js 16 works out of the box.

No changes to application code. vinext shims all next/* imports automatically — no import rewrites needed.

App Router

Full App Router support. Nested layouts, loading states, error boundaries, parallel routes, intercepting routes — all working.

Pages Router

Complete Pages Router support including getStaticProps, getServerSideProps, getStaticPaths, _app, and _document.

React Server Components

Via @vitejs/plugin-rsc. "use client" and "use server" directives work correctly across both dev and production builds.

Server Actions

Form submissions, mutations, redirect() inside actions, re-render after mutation. Full FormData support.

Streaming SSR

Streaming server rendering for both routers. RSC payload streaming with Suspense boundaries.

ISR & Caching

Incremental Static Regeneration with stale-while-revalidate. Pluggable CacheHandler. "use cache" directive with cacheLife() and cacheTag().

Middleware

middleware.ts and proxy.ts (Next.js 16). Full matcher patterns: string, array, regex, :param, :path*.

Static Export

output: "export" generates static HTML/JSON for all routes. No server required.

All next/* imports

33 module shims covering every next/* import — next/link, next/image, next/navigation, next/server, next/headers, next/og, and more.

Migrate in one command

Run npx vinext check to scan for compatibility issues, then npx vinext init to migrate. Non-destructive — your existing Next.js setup keeps working alongside vinext.

$npx vinext check
$npx vinext init
Performance

Built for speed.

Compared against Next.js 16 using a shared 33-route App Router app. TypeScript type checking and ESLint disabled in both to isolate bundler performance.

Production Build Time
Next.js 16.1.6 (Turbopack)
7.38sbaseline
vinext (Vite 7 / Rollup)
4.64s1.6× faster
vinext (Vite 8 / Rolldown)
1.67s4.4× faster
Client Bundle Size (gzipped)
Next.js 16.1.6
168.9 KBbaseline
vinext (Rollup)
74.0 KB56% smaller
vinext (Rolldown)
72.9 KB57% smaller

Benchmarks run on GitHub CI (2-core Ubuntu) on every merge to main. Take as directional, not definitive. View live results →

Cloudflare Workers

From source to deployed
in one command.

vinext deploy auto-generates vite.config.ts, wrangler.jsonc, and worker/index.ts if needed, builds your app, and ships it to Cloudflare Workers.

First-time setup

  • Local: run wrangler login once to authenticate in the browser.
  • CI: set CLOUDFLARE_API_TOKEN (Edit Cloudflare Workers template) and CLOUDFLARE_ACCOUNT_ID or add account_id to wrangler.jsonc.

Access D1, R2, KV, Durable Objects, Workers AI, and other bindings with the recommended import — no custom worker entry or getPlatformProxy() required:

import { env } from "cloudflare:workers"
# env.DB, env.KV, env.R2, env.AI, …
  • Full App Router and Pages Router support on Workers
  • Client-side hydration, navigation, and React state
  • ISR via Cloudflare KV — pluggable CacheHandler
  • D1, R2, KV, Durable Objects, AI — typed via wrangler types
  • Traffic-aware Pre-Rendering (experimental)
vinext deploy
$ wrangler login
✓ Logged in
$ vinext deploy
Building...
Build complete (4.2s)
Auto-generating wrangler.jsonc...
Deploying to Cloudflare Workers...
✓ deployed
Live at my-app.workers.dev
# D1 in a server component
import { env } from "cloudflare:workers"
const posts = await env.DB.prepare("SELECT * FROM posts").all()

Deploy elsewhere

Not on Cloudflare? Add the Nitro Vite plugin alongside vinext to deploy to Vercel, Netlify, AWS Amplify, Deno Deploy, Node.js, and more.

Nitro setup in README →
--experimental-tpr
$ vinext deploy --experimental-tpr
Building...
Build complete (4.2s)
TPR 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...
✓ deployed
Experimental

Traffic-aware
Pre-Rendering.

Instead of pre-rendering your entire site at build time, vinext queries Cloudflare zone analytics and pre-renders only the pages that actually get traffic — then caches them to KV.

For a store with 100,000 product pages, the power law means 90% of traffic goes to 50–200 pages. Those render in seconds. Everything else falls back to on-demand SSR and gets cached via ISR after the first request.

No generateStaticParams() required
No coupling to your production database at build time
Pages that go viral are picked up automatically on next deploy
SSG-level latency for the pages that matter
Live examples

Running in production, right now.

All deployed to Cloudflare Workers. Updated on every push to main.

Get started

Your Next.js app,
on Vite.

Three ways to migrate. Pick whichever fits your workflow.

RecommendedAgent Skill — works with Cursor, Claude Code, Codex, OpenCode
$npx skills add cloudflare/vinext
>Then tell your AI: "migrate this project to vinext"

The skill handles compatibility checking, dependency installation, config generation, and dev server startup.

CLI — scan first, then automated migration
$npx vinext check
$npx vinext init

init runs check automatically; use check alone to preview issues first.

Manual — replace package and scripts
$ npm install -D vinext vite @vitejs/plugin-react
# App Router: also add @vitejs/plugin-rsc react-server-dom-webpack
# replace "next" with "vinext" in package.json scripts

MIT License · Experimental · Built by Cloudflare with AI