Skip to content

Commit 1985b2b

Browse files
committed
fixup! fix(@angular/build): improve library compilation diagnostics and skip redundant d.ts rebundling
1 parent f418f66 commit 1985b2b

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

‎packages/angular/build/src/builders/library/pipeline/compilation.ts‎

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,13 @@ export async function compileLibrary(
168168

169169
const hasStylesheetErrors = stylesheetErrors.length > 0;
170170
const emittedFiles = hasStylesheetErrors ? [] : await compilationInstance.emitAffectedFiles();
171+
const diagnosePromise = runDiagnosticsAndFormat(
172+
compilationInstance,
173+
stylesheetErrors,
174+
stylesheetWarnings,
175+
colors,
176+
buildState,
177+
);
171178

172179
const esmFiles = cached?.esmFiles ?? new Map<string, string>();
173180
const dtsFiles = cached?.dtsFiles ?? new Map<string, string>();
@@ -180,14 +187,6 @@ export async function compileLibrary(
180187
cached ? effectiveModifiedFiles : undefined,
181188
);
182189

183-
const diagnosePromise = runDiagnosticsAndFormat(
184-
compilationInstance,
185-
stylesheetErrors,
186-
stylesheetWarnings,
187-
colors,
188-
buildState,
189-
);
190-
191190
return {
192191
esmFiles,
193192
dtsFiles,

0 commit comments

Comments
 (0)