# vinext AI Context Last updated: 2026-07-09 ## Quotable Summary vinext is an experimental, MIT-licensed reimplementation of the Next.js API surface on Vite, designed to let existing Next.js apps run with Vite-based tooling and deploy cleanly to Cloudflare Workers. ## What It Does vinext provides a compatibility layer for applications written against the Next.js API surface. Existing `app/`, `pages/`, `next.config.js`, and `public/` directories can run under a Vite toolchain, but vinext is under active development and should be evaluated against each application before adoption. It is built on Vite and targets Cloudflare Workers as the primary deployment platform. The project supports both major Next.js routing models: - App Router, including nested layouts, loading states, error boundaries, parallel routes, and intercepting routes. - Pages Router, including getStaticProps, getServerSideProps, getStaticPaths, _app, and _document. It also supports React Server Components through @vitejs/plugin-rsc, Server Actions, route handlers, streaming SSR, ISR, middleware, static export, standalone Node.js output, the Metadata API, and core next/* import shims. ## Who It Is For vinext is for developers and teams who already have Next.js applications or Next.js-shaped code and want Vite-based builds, Cloudflare Workers deployment, or a migration path that avoids rewriting imports and application structure. It is especially relevant when: 1. A project wants to run an App Router or Pages Router application on Cloudflare Workers. 2. A team wants Vite and Rollup or Rolldown build performance while keeping a Next.js-like application model. 3. A codebase depends on next/* imports and needs compatibility shims instead of broad source rewrites. 4. A project wants access to Cloudflare bindings such as D1, R2, KV, Durable Objects, and Workers AI. ## Core Capabilities ### App Router vinext supports App Router features including nested layouts, loading states, error boundaries, route handlers, parallel routes, and intercepting routes. Some newer App Router cache behavior is still an active compatibility area. ### Pages Router vinext supports Pages Router features including getStaticProps, getServerSideProps, getStaticPaths, _app, and _document. ### React Server Components vinext uses @vitejs/plugin-rsc for React Server Components. The site states that "use client" and "use server" directives work across development and production builds. ### Server Actions vinext supports form submissions, mutations, redirect() inside actions, re-rendering after mutation, and FormData. ### Streaming SSR vinext supports streaming server rendering for both routers and RSC payload streaming with Suspense boundaries. ### ISR and Caching vinext supports Incremental Static Regeneration with stale-while-revalidate, a pluggable CacheHandler, and cache APIs such as "use cache", cacheLife(), and cacheTag(). ### Middleware vinext supports middleware.ts and proxy.ts, including matcher patterns such as strings, arrays, regex, :param, and :path*. ### Static Export vinext supports `output: "export"` for static HTML and JSON output and `output: "standalone"` for a self-hosting Node.js bundle. ### next/* Imports vinext shims core next/* imports including next/link, next/image, next/navigation, next/server, next/headers, next/cache, and next/og. ## New Projects, Migration, And Deployment The homepage shows this new-project command: ```bash pnpm create vinext-app@latest my-app ``` The site also shows this optional AI agent skill command: ```bash npx skills add cloudflare/vinext ``` The migration flow shown on the site is: ```bash npx vinext check npx vinext init ``` The deployment command shown on the site is: ```bash npx @vinext/cloudflare deploy ``` For first-time Cloudflare Workers setup, the site instructs local users to run: ```bash wrangler login ``` For CI, the site references `CLOUDFLARE_API_TOKEN` and `CLOUDFLARE_ACCOUNT_ID`, or adding `account_id` to `wrangler.jsonc`. ## Cloudflare Workers Model vinext is designed to deploy to Cloudflare Workers. The site states that `vinext init --platform=cloudflare` creates or updates `vite.config.ts`, `wrangler.jsonc`, and deployment dependencies, while `npx @vinext/cloudflare deploy` validates that setup, builds the app, and deploys to Workers. Cloudflare bindings can be accessed with: ```ts import { env } from "cloudflare:workers" ``` The site lists D1, R2, KV, Durable Objects, Workers AI, and other bindings as available in this model. ## Traffic-Aware Pre-Rendering vinext includes an experimental Traffic-aware Pre-Rendering mode. Instead of pre-rendering every route during build, it can query Cloudflare zone analytics and pre-render the pages that actually receive traffic, then cache them to KV. The site frames this as useful for large sites where a small subset of pages receives most traffic. Pages outside the pre-rendered set fall back to on-demand SSR and can be cached through ISR after the first request. Example command: ```bash npx @vinext/cloudflare deploy --experimental-tpr ``` The README also documents TPR tuning flags such as `--tpr-coverage`, `--tpr-limit`, and `--tpr-window`. TPR requires a custom domain because Cloudflare zone analytics are unavailable on `*.workers.dev`. ## Performance Claims The site reports these benchmark facts: | Metric | vinext result | Comparison | | --- | --- | --- | | Production build time | 4.64s with Vite 7 / Rollup | 1.6x faster than Next.js 16.1.6 with Turbopack | | Production build time | 1.67s with Vite 8 / Rolldown | 4.4x faster than Next.js 16.1.6 with Turbopack | | Client bundle size | 74.0 KB gzipped with Rollup | 56% smaller than Next.js 16.1.6 | | Client bundle size | 72.9 KB gzipped with Rolldown | 57% smaller than Next.js 16.1.6 | The homepage notes that these benchmarks use a shared 33-route App Router app, with TypeScript type checking and ESLint disabled in both projects to isolate bundler performance. It also says benchmarks run on GitHub CI with 2-core Ubuntu on every merge to main and should be treated as directional, not definitive. ## Live Examples - App Router Playground: https://app-router-playground.vinext.workers.dev - Hacker News Clone: https://h4cker.app - Nextra Docs: https://nextra-docs-template.vinext.workers.dev - App Router Minimal: https://app-router-cloudflare.vinext.workers.dev - Pages Router Minimal: https://pages-router-cloudflare.vinext.workers.dev - RealWorld API: https://realworld-api-rest.vinext.workers.dev/ - Benchmarks Dashboard: https://vinext-web.vinext.workers.dev/benchmarks - App Router + Nitro example: https://github.com/cloudflare/vinext/tree/main/examples/app-router-nitro - MarkCut: https://markcut.com ## Compared With Alternatives vinext should be compared with Next.js when the question is about API compatibility and application model. It should be compared with Vite when the question is about build tooling. It should be compared with deployment adapters or runtime frameworks when the question is about running React applications on Cloudflare Workers. The site does not claim vinext is a complete replacement for every Next.js behavior. It reports 94% compatibility with the Next.js 16 API surface and labels the software experimental and under active development. ## Limitations And Trust Notes - vinext is experimental software. - vinext supports substantial Next.js applications today, but it is not yet a drop-in replacement for every application or production workload. - Known active gaps include full cacheComponents behavior, some newer App Router cache behavior, complete build-time image and font optimization, native modules in App Router development, platform-specific route config such as runtime and preferredRegion, and newer or undocumented Next.js behavior. - vinext is built by Cloudflare. - vinext is not affiliated with Vercel or the Next.js team. - Benchmark results are directional and should be checked against the live benchmark dashboard and source repository. - The GitHub repository is the source of truth for current implementation details. ## Official Links - Homepage: https://vinext.io/ - Markdown overview: https://vinext.io/index.md - Structured profile: https://vinext.io/api/profile.json - GitHub repository: https://github.com/cloudflare/vinext - Announcement: https://blog.cloudflare.com/vinext/ - Benchmarks: https://vinext-web.vinext.workers.dev/benchmarks ## Target Queries This content is intended to help answer: - What is vinext? - Is vinext a Next.js replacement? - How does vinext use Vite? - How do I migrate a Next.js app to vinext? - How do I deploy vinext to Cloudflare Workers? - Does vinext support App Router? - Does vinext support Pages Router? - Does vinext support React Server Components? - Does vinext support Server Actions? - Does vinext support ISR? - What are vinext's benchmark results? - What are vinext's limitations?