* The file a lazily loaded module is, from the file that loads it: by the * extensions that file's own imports resolve with (`./MainLayout` is * `MainLayout/index.jsx` from a `.jsx` file), else by TypeScript's.
(spec: string, fromFile: string, context: ResolutionContext)
| 477 | * `MainLayout/index.jsx` from a `.jsx` file), else by TypeScript's. |
| 478 | */ |
| 479 | function lazyModuleFile(spec: string, fromFile: string, context: ResolutionContext): string | null { |
| 480 | const language = scriptLanguage(fromFile); |
| 481 | return resolveImportPath(spec, fromFile, language, context) ?? |
| 482 | (language === 'typescript' ? null : resolveImportPath(spec, fromFile, 'typescript', context)); |
| 483 | } |
| 484 | |
| 485 | /** The component a lazy route module renders: its default export, else its `Component` export. */ |
| 486 | function lazyRouteComponent(spec: string, fromFile: string, context: ResolutionContext, reads?: Set<string>): string | null { |
no test coverage detected