(filePath: string, context: ResolutionContext)
| 714 | * gives a page its default export, rewires a barrel — redraws the tag. |
| 715 | */ |
| 716 | export function lazyValueModules(filePath: string, context: ResolutionContext): string[] { |
| 717 | const reads = new Set<string>(); |
| 718 | for (const node of context.getNodesInFile(filePath)) { |
| 719 | if ((node.kind !== 'constant' && node.kind !== 'variable') || node.qualifiedName !== node.name || !isPascalCase(node.name)) continue; |
| 720 | const loaded = valueLoader(node, context); |
| 721 | if (!loaded) continue; |
| 722 | if (loaded.member === 'default') lazyRouteComponent(loaded.spec, filePath, context, reads); |
| 723 | else pickedExport(loaded.spec, loaded.member, filePath, context, reads); |
| 724 | } |
| 725 | return [...reads]; |
| 726 | } |
| 727 | |
| 728 | /** The module-level `const`, `let` or `var` `filePath` declares as `name`. */ |
| 729 | function declaredValue(name: string, filePath: string, context: ResolutionContext): Node | undefined { |
no test coverage detected