Skip to content

Commit 0f5348d

Browse files
hi-ogawaOpenCode
andauthored
chore(plugin-rsc): explain preserved reference validation (#1291)
Co-authored-by: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com> Co-authored-by: OpenCode <noreply@opencode.ai>
1 parent a3690f3 commit 0f5348d

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/plugin-rsc/src/plugin.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,10 @@ export function vitePluginRscMinimal(
366366
(meta) => meta.referenceKey === parsed.id,
367367
)
368368
if (!meta) {
369+
// Server references decoded by `createFromReadableStream` with
370+
// `preserveServerReferences` can reach action loading without their
371+
// modules entering the graph during replay. Transform the target on
372+
// demand to populate metadata before validating its ID.
369373
try {
370374
// https://github.com/vitejs/vite/blob/a477454442eff649b430f9e3c6caf2500fcb7183/packages/vite/src/node/server/transformRequest.ts#L170-L175
371375
const resolved = await this.resolve(parsed.id)

0 commit comments

Comments
 (0)