Skip to content

Commit 47c03b0

Browse files
alan-agius4filipesilva
authored andcommitted
refactor(@angular-devkit/build-angular): exit early when there are no component style budgets
With this change we exit the function early, when there are no budgets defined. (cherry picked from commit a35262e)
1 parent 0a54877 commit 47c03b0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/angular_devkit/build_angular/src/webpack/plugins/any-component-style-budget-checker.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ export class AnyComponentStyleBudgetChecker {
3737
stage: Compilation.PROCESS_ASSETS_STAGE_ANALYSE,
3838
},
3939
() => {
40+
// No budgets.
41+
if (this.budgets.length === 0) {
42+
return;
43+
}
44+
4045
// In AOT compilations component styles get processed in child compilations.
4146
if (!compilation.compiler.parentCompilation) {
4247
return;

0 commit comments

Comments
 (0)