RepoCloudflare (Workers AI)Cloudflare (Workers AI)published Feb 24, 2026seen 5d

cloudflare/vinext

TypeScript

Open original ↗

Captured source

source ↗
published Feb 24, 2026seen 5dcaptured 13hhttp 200method plain

cloudflare/vinext

Description: Vite plugin that reimplements the Next.js API surface — deploy anywhere

Language: TypeScript

License: MIT

Stars: 8180

Forks: 334

Open issues: 212

Created: 2026-02-24T05:07:41Z

Pushed: 2026-06-11T00:40:09Z

Default branch: main

Fork: no

Archived: no

README:

vinext

The Next.js API surface, reimplemented on Vite.

> Read the announcement: How we rebuilt Next.js with AI in one week

> 🚧 Experimental — under heavy development. This project is an experiment in AI-driven software development. The vast majority of the code, tests, and documentation are written by AI, with humans steering throughout: setting architecture and priorities, making design decisions, reviewing changes, triaging complex problems, and shipping fixes. There may be bugs, rough edges, or things that don't work. Use at your own risk.

Quick start

vinext includes an Agent Skill that handles migration for you. It works with Claude Code, OpenCode, Cursor, Codex, and dozens of other AI coding tools. Install it, open your Next.js project, and tell the AI to migrate:

npx skills add cloudflare/vinext

Then open your Next.js project in any supported tool and say:

migrate this project to vinext

The skill handles compatibility checking, dependency installation, config generation, and dev server startup. It knows what vinext supports and will flag anything that needs manual attention.

Or do it manually

npm install -D vinext vite @vitejs/plugin-react

If you're using the App Router, also install:

npm install -D @vitejs/plugin-rsc react-server-dom-webpack

Replace next with vinext in your scripts:

{
"scripts": {
"dev": "vinext dev",
"build": "vinext build",
"start": "vinext start"
}
}
vinext dev # Development server with HMR
vinext build # Production build
vinext deploy # Build and deploy to Cloudflare Workers

vinext auto-detects your app/ or pages/ directory, loads next.config.js, and configures Vite automatically. No vite.config.ts required for basic usage.

Your existing pages/, app/, next.config.js, and public/ directories work as-is. Run vinext check first to scan for known compatibility issues, or use vinext init to [automate the full migration](#migrating-an-existing-nextjs-project).

CLI reference

| Command | Description | | --------------- | ----------------------------------------------------------------------- | | vinext dev | Start dev server with HMR | | vinext build | Production build (multi-environment for App Router: RSC + SSR + client) | | vinext start | Start local production server for testing | | vinext deploy | Build and deploy to Cloudflare Workers | | vinext init | Migrate a Next.js project to run under vinext | | vinext check | Scan your Next.js app for compatibility issues before migrating | | vinext lint | Delegate to eslint or oxlint |

Options: -p / --port , -H / --hostname , --turbopack (accepted, no-op).

vinext deploy options: --preview, --env , --name , --skip-build, --dry-run, --experimental-tpr.

vinext init options: --port (default: 3001), --skip-check, --force.

If your next.config.* sets output: "standalone", vinext build emits a self-hosting bundle at dist/standalone/. Start it with:

node dist/standalone/server.js

Environment variables: PORT (default 3000), HOST (default 0.0.0.0).

> Note: Next.js standalone uses HOSTNAME for the bind address, but vinext uses HOST to avoid collision with the system-set HOSTNAME variable on Linux. Update your deployment config accordingly.

Starting a new vinext project

Run npm create next-app@latest to create a new Next.js project, and then follow these instructions to migrate it to vinext.

In the future, we will have a proper npm create vinext new project workflow.

Migrating an existing Next.js project

vinext init automates the migration in one command:

npx vinext init

This will:

1. Run vinext check to scan for compatibility issues 2. Install vite, @vitejs/plugin-react, and App Router-only deps (@vitejs/plugin-rsc, react-server-dom-webpack) as devDependencies 3. Rename CJS config files (e.g. postcss.config.js -> .cjs) to avoid ESM conflicts 4. Add "type": "module" to package.json 5. Add dev:vinext, build:vinext, and start:vinext scripts to package.json 6. Generate a minimal vite.config.ts

The migration is non-destructive -- your existing Next.js setup continues to work alongside vinext. It does not modify next.config, tsconfig.json, or any source files, and it does not remove Next.js dependencies.

vinext targets Vite 8, which defaults to Rolldown, Oxc, Lightning CSS, and a newer browser baseline. If you bring custom Vite config or plugins from an older setup, prefer oxc, optimizeDeps.rolldownOptions, and build.rolldownOptions over older esbuild and build.rollupOptions knobs, and override build.target if you still need older browsers. If a dependency breaks because of stricter CommonJS default import handling, fix the import or use legacy.inconsistentCjsInterop: true as a temporary escape hatch. See the Vite 8 migration guide.

npm run dev:vinext # Start the vinext dev server (port 3001)
npm run build:vinext # Build production output with vinext
npm run start:vinext # Start vinext production server
npm run dev # Still runs Next.js as before

Use --force to overwrite an existing vite.config.ts, or --skip-check to skip the compatibility report.

Why

Vite has become the default build tool for modern web frameworks — fast HMR, a clean plugin API, native ESM, and a growing ecosystem. With `@vitejs/plugin-rsc` adding React Server Components support, it's now possible to build a full RSC framework on Vite.

vinext is an experiment: can we reimplement the Next.js API surface on Vite, so that existing Next.js applications can run on a completely different toolchain? The answer, so far, is mostly yes.

vinext works everywhere. It natively supports Cloudflare Workers (with vinext deploy, bindings, KV caching), and can be deployed to Vercel, Netlify, AWS, Deno Deploy, and more via the Nitro Vite plugin. Native…

Excerpt shown — open the source for the full document.

Notability

notability 7.0/10

High stars, Cloudflare release, but HN modest.