MCPcopy
hub / github.com/rollup/rollup / handleInvalidResolvedId

Method handleInvalidResolvedId

src/ModuleLoader.ts:669–693  ·  view source on GitHub ↗
(
		resolvedId: ResolvedId | null,
		source: string,
		importer: string,
		attributes: Record<string, string>
	)

Source from the content-addressed store, hash-verified

667 }
668
669 private handleInvalidResolvedId(
670 resolvedId: ResolvedId | null,
671 source: string,
672 importer: string,
673 attributes: Record<string, string>
674 ): ResolvedId {
675 if (resolvedId === null) {
676 if (isRelative(source)) {
677 return error(logUnresolvedImport(source, importer));
678 }
679 this.options.onLog(LOGLEVEL_WARN, logUnresolvedImportTreatedAsExternal(source, importer));
680 return {
681 attributes,
682 external: true,
683 id: source,
684 meta: {},
685 moduleSideEffects: this.hasModuleSideEffects(source, true),
686 resolvedBy: 'rollup',
687 syntheticNamedExports: false
688 };
689 } else if (resolvedId.external && resolvedId.syntheticNamedExports) {
690 this.options.onLog(LOGLEVEL_WARN, logExternalSyntheticExports(source, importer));
691 }
692 return resolvedId;
693 }
694
695 private async loadEntryModule(
696 unresolvedId: string,

Callers 2

resolveDynamicImportMethod · 0.95

Calls 5

isRelativeFunction · 0.90
errorFunction · 0.90
logUnresolvedImportFunction · 0.90

Tested by

no test coverage detected