File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
packages/angular/build/src Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -184,9 +184,6 @@ export async function executeBuild(
184184
185185 executionResult . outputFiles . push ( ...outputFiles ) ;
186186
187- const changedFiles =
188- rebuildState && executionResult . findChangedFiles ( rebuildState . previousOutputInfo ) ;
189-
190187 // Analyze files for bundle budget failures if present
191188 let budgetFailures : BudgetCalculatorResult [ ] | undefined ;
192189 if ( options . budgets ) {
@@ -288,6 +285,8 @@ export async function executeBuild(
288285 }
289286
290287 if ( ! jsonLogs ) {
288+ const changedFiles =
289+ rebuildState && executionResult . findChangedFiles ( rebuildState . previousOutputInfo ) ;
291290 executionResult . addLog (
292291 logBuildStats (
293292 metafile ,
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ export function logBuildStats(
4040 ssrOutputEnabled ?: boolean ,
4141 verbose ?: boolean ,
4242) : string {
43+ // Remove the i18n subpath in case the build is using i18n.
44+ // en-US/main.js -> main.js
45+ const normalizedChangedFiles : Set < string > = new Set (
46+ [ ...( changedFiles ?? [ ] ) ] . map ( ( f ) => basename ( f ) ) ,
47+ ) ;
4348 const browserStats : BundleStats [ ] = [ ] ;
4449 const serverStats : BundleStats [ ] = [ ] ;
4550 let unchangedCount = 0 ;
@@ -52,7 +57,7 @@ export function logBuildStats(
5257 }
5358
5459 // Show only changed files if a changed list is provided
55- if ( changedFiles && ! changedFiles . has ( file ) ) {
60+ if ( normalizedChangedFiles . size && ! normalizedChangedFiles . has ( file ) ) {
5661 ++ unchangedCount ;
5762 continue ;
5863 }
You can’t perform that action at this time.
0 commit comments