mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 00:09:23 +02:00
[PR #966] [MERGED] refactor: extract app rsc manifest construction #986
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#986
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/966
Author: @NathanDrake2406
Created: 4/29/2026
Status: ✅ Merged
Merged: 4/29/2026
Merged by: @james-elicx
Base:
main← Head:nathan/extract-generated-manifest-construction📝 Commits (1)
e07ecd7refactor: extract app rsc manifest construction📊 Changes
3 files changed (+451 additions, -210 deletions)
View changed files
📝
packages/vinext/src/entries/app-rsc-entry.ts(+15 -210)➕
packages/vinext/src/entries/app-rsc-manifest.ts(+264 -0)📝
tests/entry-templates.test.ts(+172 -0)📄 Description
Summary
Extracts the App Router RSC generated-manifest construction out of
generateRscEntry()intoapp-rsc-manifest.ts.The generator now treats the app shape as an explicit construction boundary:
generateStaticParamsmap entriesgenerateRscEntry()keeps request/runtime codegen ownership and consumes the manifest-construction result.Why
app-rsc-entry.tshad accumulated app-shape responsibilities inside the top-level RSC entry generator. That made the generated runtime path harder to review because file-system route shape, module import allocation, metadata route handling, and request lifecycle code all lived in one function.This mirrors the separation Next.js keeps between its generated App Router tree shape and the runtime route module that consumes it:
treeand passes it asuserland.loaderTree: packages/next/src/build/templates/app-page.tsLoaderTreemakes segment modules and parallel routes explicit: packages/next/src/server/lib/app-dir-module.tsVinext still uses its own scanned
AppRoutemodel, but this PR makes the equivalent app-shape-to-generated-manifest step explicit and testable.Notes
Static metadata files are now read through the extracted manifest helper. If a discovered static metadata file cannot be read, the helper throws a build-time error with the file path instead of generating an empty runtime response.
Tests
vp test run tests/entry-templates.test.tsvp checkvp run vinext#buildvp check --fix,knip --no-progress🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.