
Vinext Vite Nextjs
Run an existing Next.js app on Vite via vinext and wire scripts or deploy targets (e.g. Cloudflare Workers) without throwing away the Next.js API surface.
Overview
vinext-vite-nextjs is an agent skill for the Build phase that walks you through migrating a Next.js app to the vinext Vite plugin and optional edge or Nitro deploy targets.
Install
npx skills add https://github.com/aradotso/trending-skills --skill vinext-vite-nextjsWhat is this skill?
- Non-destructive `npx vinext init` migration: compatibility check, deps, ESM `package.json`, CJS config renames, `dev:vin
- Targets ~94% Next.js public API coverage with Pages Router and App Router support
- Reimplements `next/*` imports, routing, SSR, and RSC on Vite instead of the Next.js compiler
- Native Cloudflare Workers deployment with optional Nitro paths for AWS, Netlify, Vercel, and more
- Next.js can keep working alongside vinext during incremental cutover
- ~94% Next.js public API coverage target
- 7 automated steps in `npx vinext init` (check, deps, ESM, config renames, scripts, vite.config)
Adoption & trust: 1.2k installs on skills.sh; 31 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want Next.js ergonomics and API compatibility but need Vite speed and deploy-anywhere targets like Cloudflare Workers without a full rewrite.
Who is it for?
Solo builders with an existing Next.js repo who need Cloudflare Workers or multi-host deploy and want a guided, reversible migration to Vite.
Skip if: Greenfield apps with no Next.js surface to migrate, or teams that must stay on first-party `next build` only with zero toolchain experimentation.
When should I use this skill?
User asks to migrate to vinext, deploy Next.js to Cloudflare Workers, convert Next.js to Vite, set up vinext, or run Next.js on Vite.
What do I get? / Deliverables
You get a non-destructive vinext toolchain—check, scripts, `vite.config.ts`, and dependency wiring—so the same app can run on Vite while you validate builds and pick a deploy path.
- Updated package.json scripts (`dev:vinext`, `build:vinext`)
- Generated or updated vite.config.ts
- Dependency set for Vite, React plugin, and App Router RSC packages as needed
Recommended Skills
Journey fit
Migration and toolchain swap happen while you are still building and integrating the product stack, before production hardening is the main focus. vinext is a Vite plugin and CLI that replaces the Next compiler integration layer—routing, SSR/RSC, and deploy adapters—not a one-off UI component.
How it compares
Framework migration assistant for Next-on-Vite, not a generic “optimize Lighthouse” perf-only skill.
Common Questions / FAQ
Who is vinext-vite-nextjs for?
Indie and solo developers shipping Next.js apps who want Vite-based builds and edge-friendly deploy without abandoning the Next.js API they already use.
When should I use vinext-vite-nextjs?
During Build when you integrate a new compiler/deploy path—e.g. “migrate this project to vinext,” “convert next.js to vite,” or “deploy my next.js app to cloudflare workers”—before you treat production cutover as final.
Is vinext-vite-nextjs safe to install?
Treat it like any third-party skill: review the Security Audits panel on this Prism page and inspect what `npx vinext init` changes in your repo before merging to main.
SKILL.md
READMESKILL.md - Vinext Vite Nextjs
# vinext — Next.js API on Vite, Deploy Anywhere > Skill by [ara.so](https://ara.so) — Daily 2026 Skills collection. vinext is a Vite plugin that reimplements the Next.js public API surface (routing, SSR, RSC, `next/*` imports, CLI) so existing Next.js apps run on Vite instead of the Next.js compiler. It targets ~94% API coverage, supports both Pages Router and App Router, and deploys natively to Cloudflare Workers with optional Nitro support for AWS, Netlify, Vercel, and more. ## Installation ### New project (migrate from Next.js) ```bash # Automated one-command migration npx vinext init ``` This will: 1. Run compatibility check (`vinext check`) 2. Install `vite`, `@vitejs/plugin-react` as devDependencies 3. Install `@vitejs/plugin-rsc`, `react-server-dom-webpack` for App Router 4. Add `"type": "module"` to `package.json` 5. Rename CJS config files (e.g. `postcss.config.js` → `postcss.config.cjs`) 6. Add `dev:vinext` and `build:vinext` scripts 7. Generate a minimal `vite.config.ts` Migration is **non-destructive** — Next.js still works alongside vinext. ### Manual installation ```bash npm install -D vinext vite @vitejs/plugin-react # App Router only: npm install -D @vitejs/plugin-rsc react-server-dom-webpack ``` Update `package.json` scripts: ```json { "scripts": { "dev": "vinext dev", "build": "vinext build", "start": "vinext start", "deploy": "vinext deploy" } } ``` ### Agent Skill (AI-assisted migration) ```bash npx skills add cloudflare/vinext # Then in your AI tool: "migrate this project to vinext" ``` ## CLI Reference | Command | Description | |---|---| | `vinext dev` | Start dev server with HMR | | `vinext build` | Production build | | `vinext start` | Local production server for testing | | `vinext deploy` | Build + deploy to Cloudflare Workers | | `vinext init` | Automated migration from Next.js | | `vinext check` | Scan for compatibility issues before migrating | | `vinext lint` | Delegate to eslint or oxlint | ### CLI Options ```bash vinext dev -p 3001 -H 0.0.0.0 vinext deploy --preview vinext deploy --env staging --name my-app vinext deploy --skip-build --dry-run vinext deploy --experimental-tpr vinext init --port 3001 --skip-check --force ``` ## Configuration vinext auto-detects `app/` or `pages/` directory and loads `next.config.js` automatically. No `vite.config.ts` is required for basic usage. ### Minimal `vite.config.ts` ```typescript import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { vinext } from 'vinext/vite' export default defineConfig({ plugins: [ react(), vinext(), ], }) ``` ### App Router `vite.config.ts` ```typescript import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import rsc from '@vitejs/plugin-rsc' import { vinext } from 'vinext/vite' export default defineConfig({ plugins: [ react(), rsc(), vinext(), ], }) ``` ### Cloudflare Workers with bindings ```typescript import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { vinext } from 'vinext/vite' import { cloudflare } from '@cloudflare/vite-plugin' export default defineConfig({ plugins: [ cloudflare(), react(), vinext(), ], }) ``` ### Other platforms via Nitro ```typescript import { defineConfig } from 'vite' import react from '@vitejs/plugin-react' import { vinext } from 'vinext/vite' import nitro from 'vite-plugin-nitro' export default defineConfig({ plugins: [ react(), vinext(), nitro({ preset: 'vercel' }), // or 'netlify', 'aws-amplify