Skip to content

Commit

Permalink
fix: emit .tsbuildinfo when cache mode is enabled
Browse files Browse the repository at this point in the history
Change #2682 caused an incorrect behaviour that caused the tsbuild info not to be emitted.

(cherry picked from commit 5f32591)
  • Loading branch information
alan-agius4 committed Sep 4, 2023
1 parent e9d8608 commit 2a0ee90
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/lib/ngc/compile-source-files.ts
Expand Up @@ -191,6 +191,19 @@ export async function compileSourceFiles(
}

const transformers = angularCompiler.prepareEmit().transformers;

if ('getSemanticDiagnosticsOfNextAffectedFile' in builder) {
while (
builder.emitNextAffectedFile((fileName, data, writeByteOrderMark, onError, sourceFiles) => {
if (fileName.endsWith('.tsbuildinfo')) {
tsCompilerHost.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles);
}
})
) {
// empty
}
}

for (const sourceFile of builder.getSourceFiles()) {
if (ignoreForEmit.has(sourceFile)) {
continue;
Expand Down

0 comments on commit 2a0ee90

Please sign in to comment.