explaingit

cloudflare/vinext

8,060TypeScriptAudience · developerComplexity · 3/5Setup · moderate

TLDR

An experimental tool that lets you run an existing Next.js app on the Vite build engine and deploy it to Cloudflare Workers, without rewriting your pages or app directory structure.

Mindmap

mindmap
  root((vinext))
    What it does
      Next.js on Vite engine
      Cloudflare Workers deploy
    How it works
      Install package
      Run vinext init
      Compatibility check
    Benefits
      Faster dev reload
      Deploy beyond Vercel
      Edge network speed
    Status
      Experimental
      AI-assisted development
    Target Users
      Next.js developers
      Cloudflare users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Migrate a Next.js app away from Vercel and deploy it to Cloudflare Workers without rewriting your pages or components.

USE CASE 2

Get faster hot-reload during development by swapping Next.js's build system for Vite while keeping your existing file structure.

USE CASE 3

Run the vinext compatibility check before migrating to see which Next.js features your app uses that may need attention.

USE CASE 4

Deploy a Next.js project globally on Cloudflare's edge network so pages load fast for users around the world.

Tech stack

TypeScriptNext.jsViteCloudflare Workers

Getting it running

Difficulty · moderate Time to first run · 30min

Experimental, primarily AI-written with human oversight, expect rough edges, especially with advanced Next.js features.

License terms not specified in the description.

In plain English

Vinext is a tool that lets you take an existing Next.js web application, a site built with a popular framework for building websites, and run it using a different underlying build engine called Vite, without rewriting your code. Think of it like swapping the engine in a car: the body stays the same, but the engine is newer and faster. The problem it solves: Next.js is tied to its own build system, which works well but locks you into Vercel's hosting infrastructure or requires manual workarounds for other platforms. Vinext reimplements the same features and file structure that Next.js developers expect, but runs them on Vite's engine, which has faster reloads during development and more flexibility about where you deploy. How it works: you install the vinext package, swap a few lines in your project's scripts file, and your existing pages, app directory, and config files continue to work. Vinext auto-detects your project layout and configures itself. A built-in migration command (vinext init) does most of this automatically and runs a compatibility check first. The development server gives you live reloading (changes appear instantly), and a deploy command publishes directly to Cloudflare Workers, meaning your app runs close to users around the world rather than on a single server. You would use vinext if you have a Next.js project and want to deploy it somewhere other than Vercel, especially Cloudflare Workers, without the complexity of manually adapting your build output. It's marked as experimental and primarily written by AI with human oversight, so it's suited for projects where you're comfortable with some rough edges. The full README is longer than what was provided.

Copy-paste prompts

Prompt 1
I have an existing Next.js app and I want to try vinext. Walk me through running `vinext init`, what the compatibility check reports, and what I need to fix before deploying.
Prompt 2
Show me the exact changes vinext makes to my package.json scripts section and explain what each new script does.
Prompt 3
I'm deploying my vinext app to Cloudflare Workers. Write the wrangler.toml configuration I need and explain each setting.
Prompt 4
My Next.js app uses middleware and API routes. Which of these does vinext support today, and what are the known gaps I should plan around?
Open on GitHub → Explain another repo

← cloudflare on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.