fix(angular): display template error when cache is disabled in ng-packagr executors (#20277)

This commit is contained in:
Leosvel Pérez Espinosa 2023-11-16 16:19:17 +01:00 committed by GitHub
parent 5bf1a928e7
commit f79fe20520
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 6 deletions

View File

@ -100,9 +100,10 @@ export async function compileSourceFiles(
); );
cache.oldNgtscProgram = angularProgram; cache.oldNgtscProgram = angularProgram;
} else { } else {
// When not in watch mode, the startup cost of the incremental analysis can be avoided by builder = ts.createEmitAndSemanticDiagnosticsBuilderProgram(
// using an abstract builder that only wraps a TypeScript program. typeScriptProgram,
builder = ts.createAbstractBuilder(typeScriptProgram, tsCompilerHost); tsCompilerHost
);
} }
// Update semantic diagnostics cache // Update semantic diagnostics cache

View File

@ -113,9 +113,10 @@ export async function compileSourceFiles(
); );
cache.oldNgtscProgram = angularProgram; cache.oldNgtscProgram = angularProgram;
} else { } else {
// When not in watch mode, the startup cost of the incremental analysis can be avoided by builder = ts.createEmitAndSemanticDiagnosticsBuilderProgram(
// using an abstract builder that only wraps a TypeScript program. typeScriptProgram,
builder = ts.createAbstractBuilder(typeScriptProgram, tsCompilerHost); tsCompilerHost
);
} }
// Update semantic diagnostics cache // Update semantic diagnostics cache