mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Limit package.json realpath lookup to only successful resolutions
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user