Skip to content

Commit

Permalink
Only set package data map under watch mode (#46211)
Browse files Browse the repository at this point in the history
  • Loading branch information
weswigham committed Oct 6, 2021
1 parent f9bc4db commit 3bc4db4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compiler/tsbuildPublic.ts
Expand Up @@ -874,8 +874,10 @@ namespace ts {
if (state.watch) {
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)
));

state.builderPrograms.set(projectPath, program);
}
step++;
}
Expand Down

0 comments on commit 3bc4db4

Please sign in to comment.