Problem
processRscComponents (packages/static/src/build/rscProcessor.ts) accepts an appRscStream parameter, drains it, applies the ID mapping to it, and returns appRscContent — but its only caller, buildApp (packages/static/src/build/buildApp.ts), passes a dummy empty stream and ignores the returned appRscContent:
// We pass a dummy empty stream since we handle per-entry RSC payloads separately.
const dummyStream = new ReadableStream<Uint8Array>({ ... });
Per-entry payload replacement actually happens in buildSingleEntry via replaceIdsInContent. The parameter and return field appear to be leftovers from a single-entry design.
Suggested fix
Drop appRscStream/appRscContent from processRscComponents (returning only components and idMapping), simplify its tests accordingly, and delete the dummy-stream plumbing in buildApp.
Found during a framework audit.
Problem
processRscComponents(packages/static/src/build/rscProcessor.ts) accepts anappRscStreamparameter, drains it, applies the ID mapping to it, and returnsappRscContent— but its only caller,buildApp(packages/static/src/build/buildApp.ts), passes a dummy empty stream and ignores the returnedappRscContent:Per-entry payload replacement actually happens in
buildSingleEntryviareplaceIdsInContent. The parameter and return field appear to be leftovers from a single-entry design.Suggested fix
Drop
appRscStream/appRscContentfromprocessRscComponents(returning onlycomponentsandidMapping), simplify its tests accordingly, and delete the dummy-stream plumbing inbuildApp.Found during a framework audit.