fix(js): resolve imports as native node apis before npm modules (#18358)
This commit is contained in:
parent
35e95f0c53
commit
0fd8859c37
@ -60,6 +60,11 @@ export class TargetProjectLocator {
|
||||
}
|
||||
}
|
||||
|
||||
if (builtInModuleSet.has(normalizedImportExpr)) {
|
||||
this.npmResolutionCache.set(normalizedImportExpr, null);
|
||||
return null;
|
||||
}
|
||||
|
||||
// try to find npm package before using expensive typescript resolution
|
||||
const npmProject = this.findNpmPackage(normalizedImportExpr);
|
||||
if (npmProject) {
|
||||
@ -79,11 +84,6 @@ export class TargetProjectLocator {
|
||||
}
|
||||
}
|
||||
|
||||
if (builtInModuleSet.has(normalizedImportExpr)) {
|
||||
this.npmResolutionCache.set(normalizedImportExpr, null);
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
const resolvedModule = this.resolveImportWithRequire(
|
||||
normalizedImportExpr,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user