mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Only set package data map under watch mode (#46211)
This commit is contained in:
@@ -872,12 +872,12 @@ namespace ts {
|
||||
getConfigFileParsingDiagnostics(config),
|
||||
config.projectReferences
|
||||
);
|
||||
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map(
|
||||
state.moduleResolutionCache.getPackageJsonInfoCache().entries(),
|
||||
([path, data]) => ([state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data] as const)
|
||||
));
|
||||
|
||||
if (state.watch) {
|
||||
state.lastCachedPackageJsonLookups.set(projectPath, state.moduleResolutionCache && map(
|
||||
state.moduleResolutionCache.getPackageJsonInfoCache().entries(),
|
||||
([path, data]) => ([state.host.realpath && data ? toPath(state, state.host.realpath(path)) : path, data] as const)
|
||||
));
|
||||
|
||||
state.builderPrograms.set(projectPath, program);
|
||||
}
|
||||
step++;
|
||||
|
||||
Reference in New Issue
Block a user