Angular-cli: Outputted chunks size is wrong

Created on 23 Aug 2019  路  7Comments  路  Source: angular/angular-cli

Output of ng build --prod --namedChunks

chunk {0} runtime-es2015.d414a7cb17017f37a5ee.js (runtime) 4.98 kB [entry] [rendered]
chunk {1} default~admin-admin-module-ngfactory~repository-repository-module-ngfactory-es2015.85eafd65fa45db8856df.js (default~admin-admin-module-ngfactory~repository-repository-module-ngfactory) 96.2 kB  [rendered]
chunk {2} default~entity-entity-module-ngfactory~search-search-module-ngfactory-es2015.154872f75466bfdf5320.js (default~entity-entity-module-ngfactory~search-search-module-ngfactory) 18.5 kB  [rendered]
chunk {3} default~repository-repository-module-ngfactory~search-search-module-ngfactory-es2015.6d5b04bc87aee3acd6e7.js (default~repository-repository-module-ngfactory~search-search-module-ngfactory) 18 kB  [rendered]
chunk {4} admin-admin-module-ngfactory-es2015.26e76867581d4b49ca18.js (admin-admin-module-ngfactory) 10.6 kB  [rendered]
chunk {5} core-entry-entry-module-ngfactory-es2015.391b5c7a3674a84c2808.js (core-entry-entry-module-ngfactory) 55.6 kB  [rendered]
chunk {6} diagrams-diagrams-module-ngfactory-es2015.fd535f2bb03fe17af1f1.js (diagrams-diagrams-module-ngfactory) 842 kB  [rendered]
chunk {7} documents-documents-module-ngfactory-es2015.4fee80dd02d299b1c46d.js (documents-documents-module-ngfactory) 2.07 kB  [rendered]
chunk {8} entity-entity-module-ngfactory-es2015.ddf22ee7857de5b049d2.js (entity-entity-module-ngfactory) 329 kB  [rendered]
chunk {9} home-home-module-ngfactory-es2015.e9d46bd4acbfe2b31d59.js (home-home-module-ngfactory) 2.06 kB  [rendered]
chunk {10} main-es2015.c7e8565f7f95810e93f1.js (main) 1.14 MB [initial] [rendered]
chunk {11} polyfills-es2015.41afa03f65b227fbc537.js (polyfills) 63.7 kB [initial] [rendered]
chunk {12} polyfills-es5-es2015.8cc7f429fa8e32ea3084.js (polyfills-es5) 214 kB [initial] [rendered]
chunk {13} repository-repository-module-ngfactory-es2015.b3593c072639dbcac23c.js (repository-repository-module-ngfactory) 300 kB  [rendered]
chunk {14} search-search-module-ngfactory-es2015.f221003cfb5b114711df.js (search-search-module-ngfactory) 38.5 kB  [rendered]
chunk {15} styles.ccc5e00034cc0b0aad81.css (styles) 459 kB [initial] [rendered]
Date: 2019-08-23T09:16:24.504Z - Hash: 8a2767478a56fd245505 - Time: 58057ms

WARNING in budgets, maximum exceeded for initial. Budget 1.46 MB was exceeded by 413 kB.
Generating ES5 bundles for differential loading...
ES5 bundle generation complete.

Real sizes using webpack-bundle-analyzer
Screenshot_20190823_111850


Angular CLI: 8.3.0
Node: 11.10.0
OS: linux x64
Angular: 8.2.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router

Package                           Version
-----------------------------------------------------------
@angular-devkit/architect         0.803.0
@angular-devkit/build-angular     0.803.0
@angular-devkit/build-optimizer   0.803.0
@angular-devkit/build-webpack     0.803.0
@angular-devkit/core              8.3.0
@angular-devkit/schematics        8.3.0
@angular/cdk                      8.1.3
@angular/cli                      8.3.0
@ngtools/webpack                  8.3.0
@nguniversal/express-engine       8.1.1
@schematics/angular               8.3.0
@schematics/update                0.803.0
rxjs                              6.5.2
typescript                        3.5.3
webpack                           4.39.2

This does not happen with CLI 8.2.2 and Devkit 0.802.

devkibuild-angular high regression bufix

Most helpful comment

@lppedd, the actual bundles size shouldn鈥檛 vary as the mangling is still happening afterwards. Hence the sizes you are seeing there are not totally correct.

All 7 comments

I think this might be related to this PR https://github.com/angular/angular-cli/pull/15246 because now property mangling happens at a later stage outside of Webpack.

The above issue will also effect Bundle Budgets as it will due the size checks against non mangled code.

FYI @clydin

@alan-agius4 Thanks for the quick answer. Do I need to worry about bundle size? Doesn't seem so, but I'm asking anyway.

I think an informative message about why ES5 chunks are not shown in the output should be added.

@lppedd, the actual bundles size shouldn鈥檛 vary as the mangling is still happening afterwards. Hence the sizes you are seeing there are not totally correct.

+1, affecting budgets checks for us, double checked that the resulting file sizes don't match the reported file size.

Facing a similar issue. Total build size reported by Angular CLI with @angular-devkit/build-angular version 0.803.0 is ~1.2MB higher than with older version 0.802.2.

Still seeing this issue with latest @angular/cli 8.3.12 @angular-devkit/build-angular 0.803.12.

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

_This action has been performed automatically by a bot._

Was this page helpful?
0 / 5 - 0 ratings

Related issues

donaldallen picture donaldallen  路  3Comments

rajjejosefsson picture rajjejosefsson  路  3Comments

delasteve picture delasteve  路  3Comments

jmurphzyo picture jmurphzyo  路  3Comments

daBishMan picture daBishMan  路  3Comments