* Whether a file reads the browser's page, so that the `browser` condition of * an import is the one it runs with: react's `fixtures/flight/src/index.js`, * which a bundler builds for the page, takes `react-server-dom-webpack/client` * as `client.browser.js`, not the `node` variant a server's fil
(file: string, context: ResolutionContext)
| 1885 | * as `client.browser.js`, not the `node` variant a server's file gets. |
| 1886 | */ |
| 1887 | function isBrowserCode(file: string, context: ResolutionContext): boolean { |
| 1888 | const source = context.readFile(file); |
| 1889 | return !!source && BROWSER_GLOBAL_READ.test(blankStringContents(stripCommentsForRegex(source, 'typescript'))); |
| 1890 | } |
| 1891 | |
| 1892 | /** `target`, build output the index lacks, as the indexed source it is built from (see builtSourcesOf); null when there is none. */ |
| 1893 | function builtSourceOf(target: string, packageDir: string, language: Language, context: ResolutionContext): string | null { |
no test coverage detected