[PR #82] [MERGED] feat: support nitro plugin to deploy everywhere #294

Closed
opened 2026-05-06 12:39:01 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/82
Author: @pi0
Created: 2/26/2026
Status: Merged
Merged: 3/1/2026
Merged by: @southpolesteve

Base: mainHead: nitro


📝 Commits (4)

  • 78689af feat: support nitro plugin to deploy everywhere
  • 63da5a5 try vite 7
  • b55bbf7 cover more features in playground
  • 0d67999 Merge remote-tracking branch 'origin/main' into fix/nitro-conflicts

📊 Changes

22 files changed (+1325 additions, -5 deletions)

View changed files

examples/app-router-nitro/.gitignore (+3 -0)
examples/app-router-nitro/README.md (+31 -0)
examples/app-router-nitro/app/_guestbook.ts (+10 -0)
examples/app-router-nitro/app/_styles.ts (+128 -0)
examples/app-router-nitro/app/about/page.tsx (+101 -0)
examples/app-router-nitro/app/actions.ts (+17 -0)
examples/app-router-nitro/app/api/hello/route.ts (+51 -0)
examples/app-router-nitro/app/blog/[slug]/page.tsx (+92 -0)
examples/app-router-nitro/app/components/clock.tsx (+22 -0)
examples/app-router-nitro/app/components/counter.tsx (+56 -0)
examples/app-router-nitro/app/error.tsx (+26 -0)
examples/app-router-nitro/app/layout.tsx (+114 -0)
examples/app-router-nitro/app/loading.tsx (+16 -0)
examples/app-router-nitro/app/not-found.tsx (+19 -0)
examples/app-router-nitro/app/page.tsx (+99 -0)
examples/app-router-nitro/middleware.ts (+22 -0)
examples/app-router-nitro/package.json (+17 -0)
examples/app-router-nitro/tsconfig.json (+13 -0)
examples/app-router-nitro/vite.config.ts (+10 -0)
📝 packages/vinext/src/index.ts (+11 -5)

...and 2 more files

📄 Description

#80 (https://github.com/cloudflare/vinext/issues/80#issuecomment-3963196097)

This PR adds support for the Nitro Vite plugin. It enables deployment to all Nitro deployment targets with no additional overhead.

For local development, the SSR entry must export { fetch }. This PR updates the default SSR entry to export it. (This follows the same contract between Nitro and TanStack Start)

When the plugin is detected, related configuration (such as externals) are adjusted automatically.

Deployment

In most CI/CD environments, deployment requires zero configuration beyond adding the plugin.

Local deployment:

NITRO_PRESET=<preset> pnpm build && pnpm nitro deploy --prebuilt

Example deployments:

Notes

  • vite preview appears to have an issue with RSC.
    This likely needs to be resolved in either Nitro or the RSC plugin.
  • Not thoroughly tested for feature coverage.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cloudflare/vinext/pull/82 **Author:** [@pi0](https://github.com/pi0) **Created:** 2/26/2026 **Status:** ✅ Merged **Merged:** 3/1/2026 **Merged by:** [@southpolesteve](https://github.com/southpolesteve) **Base:** `main` ← **Head:** `nitro` --- ### 📝 Commits (4) - [`78689af`](https://github.com/cloudflare/vinext/commit/78689af184e4e803a4b5c903e1b094d3b18c9d51) feat: support nitro plugin to deploy everywhere - [`63da5a5`](https://github.com/cloudflare/vinext/commit/63da5a5c885eed8c6902f4e85d35de62664e2597) try vite 7 - [`b55bbf7`](https://github.com/cloudflare/vinext/commit/b55bbf7a4e8b29a98a6d2a309577a575b108def4) cover more features in playground - [`0d67999`](https://github.com/cloudflare/vinext/commit/0d6799995c37f679cf0b90572bea66eecb2b97ce) Merge remote-tracking branch 'origin/main' into fix/nitro-conflicts ### 📊 Changes **22 files changed** (+1325 additions, -5 deletions) <details> <summary>View changed files</summary> ➕ `examples/app-router-nitro/.gitignore` (+3 -0) ➕ `examples/app-router-nitro/README.md` (+31 -0) ➕ `examples/app-router-nitro/app/_guestbook.ts` (+10 -0) ➕ `examples/app-router-nitro/app/_styles.ts` (+128 -0) ➕ `examples/app-router-nitro/app/about/page.tsx` (+101 -0) ➕ `examples/app-router-nitro/app/actions.ts` (+17 -0) ➕ `examples/app-router-nitro/app/api/hello/route.ts` (+51 -0) ➕ `examples/app-router-nitro/app/blog/[slug]/page.tsx` (+92 -0) ➕ `examples/app-router-nitro/app/components/clock.tsx` (+22 -0) ➕ `examples/app-router-nitro/app/components/counter.tsx` (+56 -0) ➕ `examples/app-router-nitro/app/error.tsx` (+26 -0) ➕ `examples/app-router-nitro/app/layout.tsx` (+114 -0) ➕ `examples/app-router-nitro/app/loading.tsx` (+16 -0) ➕ `examples/app-router-nitro/app/not-found.tsx` (+19 -0) ➕ `examples/app-router-nitro/app/page.tsx` (+99 -0) ➕ `examples/app-router-nitro/middleware.ts` (+22 -0) ➕ `examples/app-router-nitro/package.json` (+17 -0) ➕ `examples/app-router-nitro/tsconfig.json` (+13 -0) ➕ `examples/app-router-nitro/vite.config.ts` (+10 -0) 📝 `packages/vinext/src/index.ts` (+11 -5) _...and 2 more files_ </details> ### 📄 Description #80 (https://github.com/cloudflare/vinext/issues/80#issuecomment-3963196097) This PR adds support for the [Nitro](https://v3.nitro.build/) Vite plugin. It enables deployment to all Nitro [deployment targets](https://v3.nitro.build/deploy) with no additional overhead. For local development, the SSR entry must export `{ fetch }`. This PR updates the default SSR entry to export it. (This follows the same contract between Nitro and TanStack Start) When the plugin is detected, related configuration (such as externals) are adjusted automatically. ## Deployment In most CI/CD environments, deployment requires zero configuration beyond adding the plugin. Local deployment: ```bash NITRO_PRESET=<preset> pnpm build && pnpm nitro deploy --prebuilt ``` **Example deployments:** - [Vercel](https://nitro-vinext-app-router-e676m1k6d-nitrojs.vercel.app/) - [Deno Deploy](https://cloudflare-vinext.deno.dev/) - [Cloudflare Workers](https://pi0-vinext-examples-app-router-nitro.pi0.workers.dev/) (via nitro) - [Zephyr](https://pyapar-gmail-com-20-vinext-app-router-nitro-vinex-3e66c0bf7-ze.zephyrcloud.app) ## Notes - `vite preview` appears to have an issue with RSC. This likely needs to be resolved in either Nitro or the RSC plugin. - Not thoroughly tested for feature coverage. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 12:39:01 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/vinext#294
No description provided.