Skip to content

Commit

Permalink
fix(angular): display template error when cache is disabled in ng-pac…
Browse files Browse the repository at this point in the history
…kagr executors (#20277)

(cherry picked from commit f79fe20)
  • Loading branch information
leosvelperez authored and FrozenPandaz committed Nov 17, 2023
1 parent 99c2db9 commit 525e0ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,10 @@ export async function compileSourceFiles(
);
cache.oldNgtscProgram = angularProgram;
} else {
// When not in watch mode, the startup cost of the incremental analysis can be avoided by
// using an abstract builder that only wraps a TypeScript program.
builder = ts.createAbstractBuilder(typeScriptProgram, tsCompilerHost);
builder = ts.createEmitAndSemanticDiagnosticsBuilderProgram(
typeScriptProgram,
tsCompilerHost
);
}

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

// Update semantic diagnostics cache
Expand Down

0 comments on commit 525e0ca

Please sign in to comment.