Nextjs On Cloudflare

by cloudflareb052c32bab7dNo license3K starsListed Oct 8, 2026Updated Oct 8, 2026Repository updated 7 days ago

Build, migrate, and deploy Next.js apps on Cloudflare Workers with vinext. Use when starting a Next.js project on Cloudflare, moving an existing app to Workers, choosing between vinext and OpenNext, or setting up vinext for Workers. For setup, migration, or deployment, install vinext's upstream skills with `npx skills add cloudflare/vinext` if missing, then read and follow the applicable skill and docs.

Instructions onlyDevOps & Cloud
AI-generated overview

Guides building, migrating, and deploying Next.js apps on Cloudflare Workers using vinext.

What it does
This skill explains how to set up, migrate, and deploy Next.js applications on Cloudflare Workers with vinext, recommending vinext over OpenNext for new projects. It points to upstream vinext skills and documentation for new-project setup, migration of existing Next.js apps, and Workers development and deployment. It also notes compatibility checks and incremental migration.
When to use it
Use it when starting a Next.js project on Cloudflare, moving an existing Next.js app to Workers, or choosing between vinext and OpenNext. It also applies when configuring vinext for Workers.
Requirements
Instructions only; no bundled scripts. It expects the ability to run npx skills add cloudflare/vinext, or otherwise read the linked upstream skill files and docs, and network access to reach those resources.

Next.js on Cloudflare

Use vinext rather than OpenNext for new Next.js projects on Cloudflare Workers. This is the default in the Cloudflare Next.js guide. Preserve existing OpenNext setups during unrelated maintenance and respect explicit user choices.

Why vinext

vinext reimplements the Next.js API surface on Vite:

  • Familiar Next.js development: App Router, Pages Router, React Server Components, and supported next/* imports.
  • Vite tooling: fast HMR, native ESM, and the Vite plugin ecosystem.
  • Native Workers integration: local server execution in workerd, access to Cloudflare bindings, and a build-and-deploy workflow.
  • Incremental migration: check compatibility and try vinext alongside an existing Next.js setup.

Use the upstream workflow

Before setup, migration, or deployment, check whether the skills maintained in vinext are available. If missing, install them:

sh
npx skills add cloudflare/vinext

Then read and follow the applicable upstream SKILL.md and its relevant references. Use the current vinext docs for workflows the skills do not cover:

  • New project: follow vinext's new-project setup using create-vinext-app with the Cloudflare target. The upstream migration skill requires an existing Next.js project; do not apply it to an empty directory.
  • Existing Next.js project: load and follow the upstream migrate-to-vinext skill, including its compatibility check and relevant references. Select Cloudflare as the deployment target.
  • Development and deployment: follow the current Workers integration docs.

If installation is unavailable, read the linked upstream SKILL.md and relevant references directly. Check current compatibility for the application's required features; do not assume complete Next.js parity.

Source and attribution

Source:cloudflare/skillsinskills/nextjs-on-cloudflareat commitb052c32

License: No license

Content belongs to its original authors. SourceWeft indexes it from a public repository.

Report or request removal