(
context: RollupContext,
specifier: string,
importer: string | undefined,
isTransformed: (id: string) => boolean,
options?: { skipSelf?: boolean }
)
| 2731 | // resolved as a require, which Rollup's CommonJS plugin leaves to the others, |
| 2732 | // so no load runs a transform waiting on the scan |
| 2733 | const resolveUnloaded = async ( |
| 2734 | context: RollupContext, |
| 2735 | specifier: string, |
| 2736 | importer: string | undefined, |
| 2737 | isTransformed: (id: string) => boolean, |
| 2738 | options?: { skipSelf?: boolean } |
| 2739 | ): Promise<RollupResolution | null> => { |
| 2740 | const required = await context.resolve(specifier, importer, { |
| 2741 | ...options, |
| 2742 | ...asRequired |
| 2743 | }) |
| 2744 | // a package may export another module to a require, so a dependency is resolved again |
| 2745 | return !required || required.external || isTransformed(required.id) ? |
| 2746 | required |
| 2747 | : context.resolve(specifier, importer, options) |
| 2748 | } |
| 2749 | |
| 2750 | // null where no bundle holds it: it's external, or a plugin refuses it, as |
| 2751 | // React Router refuses a .server module in the client build |
no test coverage detected