-
Notifications
You must be signed in to change notification settings - Fork 11.9k
Closed
Labels
area: @angular-devkit/build-angulardevkit/build-angular:browserfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix
Milestone
Description
Defining budget for a lazy loaded module doesn't work with ng cli 6.0.0
Versions
Angular CLI: 6.0.0
Node: 9.5.0
OS: win32 x64
Angular: 6.0.0
... animations, cli, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker
Package Version
------------------------------------------------------------
@angular-devkit/architect 0.6.0
@angular-devkit/build-angular 0.6.0
@angular-devkit/build-ng-packagr 0.6.0
@angular-devkit/build-optimizer 0.6.0
@angular-devkit/core 0.6.0
@angular-devkit/schematics 0.6.0
@angular/pwa 0.6.0
@ngtools/json-schema 1.1.0
@ngtools/webpack 6.0.0
@schematics/angular 0.6.0
@schematics/package-update <error>
@schematics/update 0.6.0
ng-packagr 3.0.0-rc.2
rxjs 6.1.0
typescript 2.7.2
webpack 4.6.0
Repro steps
- Defines an application with lazyloaded modules
- Declare in angular.json file a budget for one of the lazy loaded module (I tried several names, based on a lazy loaded module named st-account
"budgets": [
{"type": "bundle", "name": "st-account", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "1.7d269d24f67b262c9dc9.js", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "StAccount", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "StAccount#Module", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "StAccountModule", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "st-account-src-lib-st-account.module#StAccountModule", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "st-account/src/lib/st-account.module#StAccountModule", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "st-account/src/lib/st-account.module", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "st-account-src-lib-st-account.module", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "st-account-src-lib-st-account-module", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "st-account-src-lib-st-account-module-ngfactory", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" },
{"type": "bundle", "name": "1", "baseline": "1kb", "maximumWarning": "1kb", "maximumError": "2kb" }
]- Run
ng build --prod
Observed behavior
No error or warning is shown.
Desired behavior
An error or warning should be shown based on budget
Mention any other details that might be useful (optional)
If I run ng build --prod --named-chunks, a warning/error is shown based on the st-account-src-lib-st-account-module-ngfactory budget rule.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area: @angular-devkit/build-angulardevkit/build-angular:browserfreq1: lowOnly reported by a handful of users who observe it rarelyOnly reported by a handful of users who observe it rarelyseverity3: brokentype: bug/fix