mirror of
https://github.com/colbymchenry/codegraph.git
synced 2026-10-18 13:53:01 +08:00
refactor(react): a JSX tag's module reads the import mapping's resolved path first
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1551,7 +1551,7 @@ function importedJsxChild(ctx: ResolutionContext, name: string, file: string, la
|
||||
if (!ctx.resolveImport || !ctx.getNodeById) return undefined;
|
||||
const mapping = ctx.getImportMappings(file, language).find((m) => m.localName === name);
|
||||
if (!mapping || mapping.isNamespace) return undefined;
|
||||
const module = resolveImportPath(mapping.source, file, language, ctx);
|
||||
const module = mapping.resolvedPath ?? resolveImportPath(mapping.source, file, language, ctx);
|
||||
if (!module) return undefined;
|
||||
const resolved = ctx.resolveImport({
|
||||
fromNodeId: '', referenceName: name, referenceKind: 'references', line: 0, column: 0, filePath: file, language,
|
||||
|
||||
Reference in New Issue
Block a user