Fixed recent regression in import resolver that caused a local import to no longer be preferred over an installed module by the same name.

This commit is contained in:
Eric Traut 2021-11-19 17:28:02 -08:00
parent cfc07ef20f
commit be6c748007

View File

@ -1371,6 +1371,11 @@ export class ImportResolver {
return newImport;
}
// Prefer local packages.
if (bestImportSoFar.importType === ImportType.Local && !bestImportSoFar.isNamespacePackage) {
return bestImportSoFar;
}
// If both are namespace imports, select the one that resolves the symbols.
if (
bestImportSoFar.isNamespacePackage &&