-
Notifications
You must be signed in to change notification settings - Fork 251
Open
Labels
enhancementNew feature or requestNew feature or request
Description
ref:
vinext/packages/vinext/src/entries/app-rsc-entry.ts
Lines 1454 to 1470 in 75eb3c1
| // Map from route pattern to generateStaticParams function. | |
| // Used by the prerender phase to enumerate dynamic route URLs without | |
| // loading route modules via the dev server. | |
| export const generateStaticParamsMap = { | |
| // TODO: layout-level generateStaticParams — this map only includes routes that | |
| // have a pagePath (leaf pages). Layout segments can also export generateStaticParams | |
| // to provide parent params for nested dynamic routes, but they don't have a pagePath | |
| // so they are excluded here. Supporting layout-level generateStaticParams requires | |
| // scanning layout.tsx files separately and including them in this map. | |
| ${routes | |
| .filter((r) => r.isDynamic && r.pagePath) | |
| .map( | |
| (r) => | |
| ` ${JSON.stringify(r.pattern)}: ${getImportVar(r.pagePath!)}?.generateStaticParams ?? null,`, | |
| ) | |
| .join("\n")} | |
| }; |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request