Limit package.json realpath lookup to only successful resolutions (#46209)
This commit is contained in:
parent
d60747f043
commit
a0cf126513
|
@ -874,7 +874,7 @@ namespace ts {
|
|||
);
|
||||
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map(
|
||||
state.moduleResolutionCache.getPackageJsonInfoCache().entries(),
|
||||
([path, data]) => ([state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data] as const)
|
||||
([path, data]) => ([state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data] as const)
|
||||
));
|
||||
|
||||
if (state.watch) {
|
||||
|
|
Loading…
Reference in a new issue