Nextjs On Cloudflare

作者 cloudflareb052c32bab7d無授權條款3K 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫7 天前更新

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.

僅含說明DevOps & Cloud
AI 產生的概覽

指導使用 vinext 在 Cloudflare Workers 上建置、遷移與部署 Next.js 應用程式。

功能
此技能說明如何使用 vinext 在 Cloudflare Workers 上建置、遷移與部署 Next.js 應用程式,並建議新專案採用 vinext 而非 OpenNext。它指向 vinext 上游技能與文件,涵蓋新專案建置、現有 Next.js 應用程式遷移,以及 Workers 開發與部署。它也提到相容性檢查與增量遷移。
適用情境
適用於在 Cloudflare 上啟動 Next.js 專案、將現有 Next.js 應用程式遷移到 Workers,或在 vinext 與 OpenNext 之間做選擇時。也適用於為 Workers 設定 vinext。
執行需求
僅為說明性內容,不附帶指令碼。需要能夠執行 npx skills add cloudflare/vinext,或直接閱讀所連結的上游技能檔案與文件,並需要網路存取這些資源。

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.

來源與署名

來源:cloudflare/skills位於skills/nextjs-on-cloudflare提交b052c32

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架