fix(core): resolve npm packages after typescript
This commit is contained in:
parent
84f873dcdb
commit
c5ccd9c2fb
@ -69,12 +69,6 @@ export class TargetProjectLocator {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// try to find npm package before using expensive typescript resolution
|
|
||||||
const npmProject = this.findNpmPackage(importExpr);
|
|
||||||
if (npmProject || this.npmResolutionCache.has(importExpr)) {
|
|
||||||
return npmProject;
|
|
||||||
}
|
|
||||||
|
|
||||||
let resolvedModule: string;
|
let resolvedModule: string;
|
||||||
if (this.typescriptResolutionCache.has(normalizedImportExpr)) {
|
if (this.typescriptResolutionCache.has(normalizedImportExpr)) {
|
||||||
resolvedModule = this.typescriptResolutionCache.get(normalizedImportExpr);
|
resolvedModule = this.typescriptResolutionCache.get(normalizedImportExpr);
|
||||||
@ -97,6 +91,13 @@ export class TargetProjectLocator {
|
|||||||
return resolvedProject;
|
return resolvedProject;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// try to find npm package before using expensive typescript resolution
|
||||||
|
const npmProject = this.findNpmPackage(importExpr);
|
||||||
|
if (npmProject || this.npmResolutionCache.has(importExpr)) {
|
||||||
|
return npmProject;
|
||||||
|
}
|
||||||
|
|
||||||
// TODO: meeroslav this block should be probably removed
|
// TODO: meeroslav this block should be probably removed
|
||||||
const importedProject = this.sortedWorkspaceProjects.find((p) => {
|
const importedProject = this.sortedWorkspaceProjects.find((p) => {
|
||||||
const projectImport = `@${npmScope}/${p.data.normalizedRoot}`;
|
const projectImport = `@${npmScope}/${p.data.normalizedRoot}`;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user