Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,6 @@ export async function executeBuild(

executionResult.outputFiles.push(...outputFiles);

const changedFiles =
rebuildState && executionResult.findChangedFiles(rebuildState.previousOutputInfo);

// Analyze files for bundle budget failures if present
let budgetFailures: BudgetCalculatorResult[] | undefined;
if (options.budgets) {
Expand Down Expand Up @@ -288,6 +285,8 @@ export async function executeBuild(
}

if (!jsonLogs) {
const changedFiles =
rebuildState && executionResult.findChangedFiles(rebuildState.previousOutputInfo);
executionResult.addLog(
logBuildStats(
metafile,
Expand Down
7 changes: 6 additions & 1 deletion packages/angular/build/src/tools/esbuild/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ export function logBuildStats(
ssrOutputEnabled?: boolean,
verbose?: boolean,
): string {
// Remove the i18n subpath in case the build is using i18n.
// en-US/main.js -> main.js
const normalizedChangedFiles: Set<string> = new Set(
[...(changedFiles ?? [])].map((f) => basename(f)),
);
const browserStats: BundleStats[] = [];
const serverStats: BundleStats[] = [];
let unchangedCount = 0;
Expand All @@ -52,7 +57,7 @@ export function logBuildStats(
}

// Show only changed files if a changed list is provided
if (changedFiles && !changedFiles.has(file)) {
if (normalizedChangedFiles.size && !normalizedChangedFiles.has(file)) {
++unchangedCount;
continue;
}
Expand Down
Loading