From e5061ef2524d2ce8caa9b0d91698fc158f7954ee Mon Sep 17 00:00:00 2001 From: Sachin Grover Date: Fri, 7 Feb 2020 22:50:58 +0530 Subject: [PATCH] fix(@angular-devkit/build-angular): correct maximum budget size message WARNING in budgets exceeded message showing wrong number Fixes angular#16871. --- .../src/angular-cli-files/utilities/bundle-calculator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts index c763ea7f1984..08b464775138 100644 --- a/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts +++ b/packages/angular_devkit/build_angular/src/angular-cli-files/utilities/bundle-calculator.ts @@ -357,7 +357,7 @@ export function* checkThresholds(thresholds: IterableIterator, size: continue; } - const sizeDifference = formatSize(threshold.limit - size); + const sizeDifference = formatSize(size - threshold.limit); yield { severity: threshold.severity, message: `Exceeded maximum budget for ${label}. Budget ${