[PR #76] feat: add Netlify as a deployment target (PoC) #290

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

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/76
Author: @serhalp
Created: 2/25/2026
Status: 🔄 Open

Base: mainHead: feat/netlify-poc


📝 Commits (1)

  • 1a2620f feat: add Netlify as a deployment target

📊 Changes

68 files changed (+6169 additions, -171 deletions)

View changed files

📝 AGENTS.md (+18 -5)
examples/app-router-netlify/app/about/page.tsx (+10 -0)
examples/app-router-netlify/app/api/hello/route.ts (+8 -0)
examples/app-router-netlify/app/blog/[slug]/page.tsx (+14 -0)
examples/app-router-netlify/app/components/counter.tsx (+16 -0)
examples/app-router-netlify/app/layout.tsx (+12 -0)
examples/app-router-netlify/app/page.tsx (+18 -0)
examples/app-router-netlify/netlify.toml (+3 -0)
examples/app-router-netlify/package.json (+18 -0)
examples/app-router-netlify/tsconfig.json (+12 -0)
examples/app-router-netlify/vite.config.ts (+7 -0)
examples/hackernews-netlify/.gitignore (+2 -0)
examples/hackernews-netlify/app/error.tsx (+7 -0)
examples/hackernews-netlify/app/favicon.ico (+0 -0)
examples/hackernews-netlify/app/globals.css (+42 -0)
examples/hackernews-netlify/app/item/[id]/(comments)/loading.tsx (+5 -0)
examples/hackernews-netlify/app/item/[id]/(comments)/page.module.css (+3 -0)
examples/hackernews-netlify/app/item/[id]/(comments)/page.tsx (+17 -0)
examples/hackernews-netlify/app/item/[id]/layout.module.css (+13 -0)
examples/hackernews-netlify/app/item/[id]/layout.tsx (+32 -0)

...and 48 more files

📄 Description

Add Netlify support alongside the existing Cloudflare Workers target.

Caution

This was fully implemented by Claude Code as a proof of concept. I have not reviewed the code at all. Do not use this for anything serious.

  • Detect @netlify/vite-plugin and configure builds accordingly (manifest generation, SSR externalization, etc.)
  • Add vinext:netlify-build plugin that generates .netlify/v1/functions/server.mjs and _headers for immutable asset caching (App Router + Pages Router)
  • Use dynamic import() in generated wrapper so NODE_ENV is set before React loads (static imports are hoisted past statements in ESM)
  • Handle Pages Router two-pass build: client closeBundle generates wrapper, SSR closeBundle patches server entry with globals
  • Add BlobCacheHandler using deploy-scoped @netlify/blobs for ISR caching
  • Add vinext/netlify package export
  • Add examples: app-router-netlify, pages-router-netlify, hackernews-netlify

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


🔄 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/76 **Author:** [@serhalp](https://github.com/serhalp) **Created:** 2/25/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `feat/netlify-poc` --- ### 📝 Commits (1) - [`1a2620f`](https://github.com/cloudflare/vinext/commit/1a2620fbea711561b326d144abdd49c3f283b786) feat: add Netlify as a deployment target ### 📊 Changes **68 files changed** (+6169 additions, -171 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+18 -5) ➕ `examples/app-router-netlify/app/about/page.tsx` (+10 -0) ➕ `examples/app-router-netlify/app/api/hello/route.ts` (+8 -0) ➕ `examples/app-router-netlify/app/blog/[slug]/page.tsx` (+14 -0) ➕ `examples/app-router-netlify/app/components/counter.tsx` (+16 -0) ➕ `examples/app-router-netlify/app/layout.tsx` (+12 -0) ➕ `examples/app-router-netlify/app/page.tsx` (+18 -0) ➕ `examples/app-router-netlify/netlify.toml` (+3 -0) ➕ `examples/app-router-netlify/package.json` (+18 -0) ➕ `examples/app-router-netlify/tsconfig.json` (+12 -0) ➕ `examples/app-router-netlify/vite.config.ts` (+7 -0) ➕ `examples/hackernews-netlify/.gitignore` (+2 -0) ➕ `examples/hackernews-netlify/app/error.tsx` (+7 -0) ➕ `examples/hackernews-netlify/app/favicon.ico` (+0 -0) ➕ `examples/hackernews-netlify/app/globals.css` (+42 -0) ➕ `examples/hackernews-netlify/app/item/[id]/(comments)/loading.tsx` (+5 -0) ➕ `examples/hackernews-netlify/app/item/[id]/(comments)/page.module.css` (+3 -0) ➕ `examples/hackernews-netlify/app/item/[id]/(comments)/page.tsx` (+17 -0) ➕ `examples/hackernews-netlify/app/item/[id]/layout.module.css` (+13 -0) ➕ `examples/hackernews-netlify/app/item/[id]/layout.tsx` (+32 -0) _...and 48 more files_ </details> ### 📄 Description Add Netlify support alongside the existing Cloudflare Workers target. - https://vinext-app-router-netlify.netlify.app/ - https://vinext-pages-router-netlify.netlify.app/ - https://vinext-hackernews-netlify.netlify.app/ > [!CAUTION] > This was fully implemented by Claude Code as a proof of concept. I have not reviewed the code at all. Do not use this for anything serious. - Detect `@netlify/vite-plugin` and configure builds accordingly (manifest generation, SSR externalization, etc.) - Add `vinext:netlify-build` plugin that generates `.netlify/v1/functions/server.mjs` and `_headers` for immutable asset caching (App Router + Pages Router) - Use dynamic `import()` in generated wrapper so `NODE_ENV` is set before React loads (static imports are hoisted past statements in ESM) - Handle Pages Router two-pass build: client closeBundle generates wrapper, SSR closeBundle patches server entry with globals - Add `BlobCacheHandler` using deploy-scoped `@netlify/blobs` for ISR caching - Add `vinext/netlify` package export - Add examples: app-router-netlify, pages-router-netlify, hackernews-netlify --- Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#290
No description provided.