Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cloudflare/vinext/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
Get up and running with vinext in just a few minutes. This guide will walk you through the fastest path to a working vinext application.vinext is a drop-in replacement for the Next.js CLI. If you have an existing Next.js project, you can migrate it to vinext with minimal changes.
Option 1: Automated Migration (Recommended)
The easiest way to get started is using the Agent Skill that handles migration automatically. It works with Claude Code, OpenCode, Cursor, Codex, and dozens of other AI coding tools.Open Your Next.js Project
Open your Next.js project in any supported AI coding tool (Claude Code, OpenCode, Cursor, etc.)
Option 2: One-Command Migration
If you prefer to migrate manually, vinext provides a single command that automates the entire process.Run vinext init
Run the migration command:This will:
- Run compatibility check to scan for issues
- Install
viteand@vitejs/plugin-rsc(for App Router) - Rename CJS config files to avoid ESM conflicts
- Add
"type": "module"topackage.json - Add
dev:vinextandbuild:vinextscripts - Generate a minimal
vite.config.ts
Option 3: Manual Setup
For maximum control, you can set up vinext manually in just a few steps.Verify Your Setup
Once you’ve completed any of the above options, verify everything is working:Check Compatibility
Before fully migrating, it’s a good idea to check your project for compatibility issues:- Which imports are supported
- Config options that work with vinext
- Libraries that are compatible
- Conventions that are supported
Deploy to Cloudflare Workers
Once your app is running locally, deploying to Cloudflare Workers is a single command:- Auto-generates configuration files (
vite.config.ts,wrangler.jsonc,worker/index.ts) - Builds your application
- Deploys to Cloudflare Workers
- Handles common migration issues automatically
Next Steps
Now that you have vinext running, here are some things to explore:Installation Guide
Learn about advanced configuration and customization
CLI Reference
Explore all available vinext commands
API Coverage
See what Next.js features are supported
Live Examples
Check out deployed examples running on Workers
Troubleshooting
Port Already in Use
If port 3000 is already in use, specify a different port:Module Not Found Errors
Make sure you have the required peer dependencies installed:Type Errors
If you see TypeScript errors, make sure yourtsconfig.json includes the correct paths. vinext uses vite-tsconfig-paths to resolve path aliases automatically.
Build Errors with App Router
For App Router projects, you need@vitejs/plugin-rsc. If you didn’t use vinext init, install it manually:
vite.config.ts:
vite.config.ts
Common Questions
Do I need to remove Next.js dependencies?
Do I need to remove Next.js dependencies?
No! The migration is non-destructive. You can keep Next.js installed and switch between
next and vinext as needed. This makes it easy to test vinext without committing fully.Will my existing Next.js code work?
Will my existing Next.js code work?
Most of it, yes! vinext supports ~94% of the Next.js 16 API surface. Run
vinext check to see what’s supported in your specific project.Can I use TypeScript?
Can I use TypeScript?
Yes! vinext fully supports TypeScript. Your existing
tsconfig.json and path aliases work automatically.What about my middleware and API routes?
What about my middleware and API routes?
Both are fully supported.
middleware.ts, proxy.ts (Next.js 16), and API routes in both pages/api/ and app/ directories work as expected.Can I deploy to platforms other than Cloudflare Workers?
Can I deploy to platforms other than Cloudflare Workers?
Currently only Cloudflare Workers is officially supported and tested. Support for other platforms is something we’d like to explore. The
vinext start command runs a Node.js server for local testing.