New advertisers: 50% off your first month with code FIRSTMONTHSee slots
cloudflare avatar

Migrate To Vinext

Migrates Next.js projects to vinext, a Vite-based reimplementation, with compatibility scanning, config generation, and ESM conversion.

skills.sh installs
9.7K
GitHub stars
9.4K
last updated
Aug 21, 2026
View on GitHub

What it does

  • Covers the migration flow: compatibility scan with vinext check, package swap, Vite config generation, ESM conversion, and deployment setup
  • Includes an automated vinext init path with --platform, Cloudflare cache and image flags, and --no-install for manual dependency control
  • Enforces a stop when next is absent from package.json, and requires explicit cache and image choices in agent sessions
  • Designed for Next.js projects moving to Cloudflare Workers natively or to other platforms through Nitro

Install

$ npx -y skills add cloudflare/vinext --skill migrate-to-vinext -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Migrate Next.js to vinext

vinext reimplements the Next.js API surface on Vite. Existing app/, pages/, and next.config.js work as-is — migration is a package swap, config generation, and ESM conversion. No changes to application code required.

FIRST: Verify Next.js Project

Confirm next is in dependencies or devDependencies in package.json. If not found, STOP — this skill does not apply.

Detect the package manager from the lockfile:

LockfileManagerInstallUninstall
pnpm-lock.yamlpnpmpnpm addpnpm remove
yarn.lockyarnyarn addyarn remove
bun.lockb / bun.lockbunbun addbun remove
package-lock.json or nonenpmnpm installnpm uninstall

Detect the router: if an app/ directory exists at root or under src/, it's App Router. If only pages/ exists, it's Pages Router. Both can coexist.

Quick Reference

Details

Repository
github.com/cloudflare/vinext
Categories
Frontend Development, Marketing & SEO, Cloud & Infrastructure

Similar to Migrate To Vinext

More Frontend Development