[PR #377] [MERGED] refactor: extract generateSsrEntry and generateBrowserEntry into entries/ #522

Closed
opened 2026-05-06 13:08:31 +02:00 by BreizhHardware · 0 comments

📋 Pull Request Information

Original PR: https://github.com/cloudflare/vinext/pull/377
Author: @james-elicx
Created: 3/9/2026
Status: Merged
Merged: 3/9/2026
Merged by: @james-elicx

Base: mainHead: refactor/extract-ssr-browser-entries


📝 Commits (1)

  • fac210f refactor: extract generateSsrEntry and generateBrowserEntry into entries/

📊 Changes

3 files changed (+789 additions, -787 deletions)

View changed files

packages/vinext/src/entries/app-browser-entry.ts (+339 -0)
packages/vinext/src/entries/app-ssr-entry.ts (+448 -0)
📝 packages/vinext/src/server/app-dev-server.ts (+2 -787)

📄 Description

Summary

  • Extracts generateSsrEntry and generateBrowserEntry from server/app-dev-server.ts into new dedicated modules under packages/vinext/src/entries/
  • app-dev-server.ts re-exports them from the new locations, keeping the public API identical
  • No snapshot changes — all 10 entry-template tests pass unchanged

Motivation

Part of the refactor tracked in #253. app-dev-server.ts is ~3200 lines; moving the two self-contained entry generators (no parameters, no closure dependencies) into entries/ is the cleanest first step.

Changes

File Change
packages/vinext/src/entries/app-ssr-entry.ts New — contains generateSsrEntry()
packages/vinext/src/entries/app-browser-entry.ts New — contains generateBrowserEntry()
packages/vinext/src/server/app-dev-server.ts Removed ~787 lines of function bodies; added 2 re-export lines

Follow-ups (not in this PR)

  • generateRscEntry (~1860 lines) → entries/app-rsc-entry.ts
  • generateServerEntry / generateClientEntry from index.ts

🔄 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/377 **Author:** [@james-elicx](https://github.com/james-elicx) **Created:** 3/9/2026 **Status:** ✅ Merged **Merged:** 3/9/2026 **Merged by:** [@james-elicx](https://github.com/james-elicx) **Base:** `main` ← **Head:** `refactor/extract-ssr-browser-entries` --- ### 📝 Commits (1) - [`fac210f`](https://github.com/cloudflare/vinext/commit/fac210fcea709feb4a50903fa48d1f91135d462b) refactor: extract generateSsrEntry and generateBrowserEntry into entries/ ### 📊 Changes **3 files changed** (+789 additions, -787 deletions) <details> <summary>View changed files</summary> ➕ `packages/vinext/src/entries/app-browser-entry.ts` (+339 -0) ➕ `packages/vinext/src/entries/app-ssr-entry.ts` (+448 -0) 📝 `packages/vinext/src/server/app-dev-server.ts` (+2 -787) </details> ### 📄 Description ## Summary - Extracts `generateSsrEntry` and `generateBrowserEntry` from `server/app-dev-server.ts` into new dedicated modules under `packages/vinext/src/entries/` - `app-dev-server.ts` re-exports them from the new locations, keeping the public API identical - No snapshot changes — all 10 entry-template tests pass unchanged ## Motivation Part of the refactor tracked in #253. `app-dev-server.ts` is ~3200 lines; moving the two self-contained entry generators (no parameters, no closure dependencies) into `entries/` is the cleanest first step. ## Changes | File | Change | |------|--------| | `packages/vinext/src/entries/app-ssr-entry.ts` | New — contains `generateSsrEntry()` | | `packages/vinext/src/entries/app-browser-entry.ts` | New — contains `generateBrowserEntry()` | | `packages/vinext/src/server/app-dev-server.ts` | Removed ~787 lines of function bodies; added 2 re-export lines | ## Follow-ups (not in this PR) - `generateRscEntry` (~1860 lines) → `entries/app-rsc-entry.ts` - `generateServerEntry` / `generateClientEntry` from `index.ts` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
BreizhHardware 2026-05-06 13:08:31 +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#522
No description provided.