( context: RollupContext, specifier: string, importer: string | undefined, isTransformed: (id: string) => boolean )
| 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 |
| 2752 | const bundledResolutionOf = async ( |
| 2753 | context: RollupContext, |
| 2754 | specifier: string, |
| 2755 | importer: string | undefined, |
| 2756 | isTransformed: (id: string) => boolean |
| 2757 | ): Promise<RollupResolution | null | undefined> => { |
| 2758 | let resolved: RollupResolution | null |
| 2759 | try { |
| 2760 | resolved = await resolveUnloaded( |
| 2761 | context, |
| 2762 | specifier, |
| 2763 | importer, |
| 2764 | isTransformed |
| 2765 | ) |
| 2766 | } catch { |
| 2767 | return null |
| 2768 | } |
| 2769 | if (!resolved) return |
| 2770 | return resolved.external ? null : resolved |
| 2771 | } |
| 2772 | |
| 2773 | const asRequired = { custom: { "node-resolve": { isRequire: true } } } |
| 2774 |
no test coverage detected