Skip to content

Commit 3bc4db4

Browse files
authored
Only set package data map under watch mode (#46211)
1 parent f9bc4db commit 3bc4db4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/compiler/tsbuildPublic.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,10 @@ namespace ts {
874874
if (state.watch) {
875875
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map(
876876
state.moduleResolutionCache.getPackageJsonInfoCache().entries(),
877-
([path, data]) => ([state.host.realpath ? toPath(state, state.host.realpath(path)) : path, data] as const)
877+
([path, data]) => ([state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data] as const)
878878
));
879+
880+
state.builderPrograms.set(projectPath, program);
879881
}
880882
step++;
881883
}

0 commit comments

Comments
 (0)