Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Outputted chunks size is wrong #15425

Closed
lppedd opened this issue Aug 23, 2019 · 7 comments · Fixed by #15666
Closed

Outputted chunks size is wrong #15425

lppedd opened this issue Aug 23, 2019 · 7 comments · Fixed by #15666

Comments

@lppedd
Copy link

lppedd commented Aug 23, 2019

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.

@alan-agius4
Copy link
Collaborator

I think this might be related to this PR #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

@lppedd
Copy link
Author

lppedd commented Aug 23, 2019

@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.

@alan-agius4
Copy link
Collaborator

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

@jonathanlie
Copy link

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

@anisabboud
Copy link

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.

clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
clydin added a commit to clydin/angular-cli that referenced this issue Sep 25, 2019
@anisabboud
Copy link

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

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 22, 2019
@clydin clydin removed their assignment Jun 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants