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

@angular-devkit/build-angular: separate differential loaded chunks in build output to fix Initial Total size #19330

Closed
1 of 15 tasks
eneajaho opened this issue Nov 9, 2020 · 1 comment · Fixed by #19333
Closed
1 of 15 tasks

Comments

@eneajaho
Copy link
Contributor

eneajaho commented Nov 9, 2020

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Description

When using ng build --prod to build an application. For example, the results will be shown like this:

Initial Chunk Files                                                                          | Names                                                         |      Size
vendor-es5.a0c3454d19ff86f83933.js                                                           | vendor                                                        | 836.90 kB
vendor-es2015.a0c3454d19ff86f83933.js                                                        | vendor                                                        | 722.77 kB
styles.7ee5235ef5fc467fa3ae.css                                                              | styles                                                        | 146.75 kB
polyfills-es5.18287c60ab9ba45f94a3.js                                                        | polyfills-es5                                                 | 128.72 kB
main-es5.666969bea863a34fa0f6.js                                                             | main                                                          |  41.49 kB
main-es2015.666969bea863a34fa0f6.js                                                          | main                                                          |  38.51 kB
polyfills-es2015.bc4f9cbda07960febcbe.js                                                     | polyfills                                                     |  36.12 kB
runtime-es2015.0703668feea579572ec2.js                                                       | runtime                                                       |   2.45 kB
runtime-es5.0703668feea579572ec2.js                                                          | runtime                                                       |   2.45 kB

                                                                                             | Initial Total                                                 |   1.91 MB

Lazy Chunk Files                                                                             | Names                                                         |      Size
pages-settings-settings-module-es5.b1d6a58e304667332cea.js                                   | pages-settings-settings-module                                |  20.41 kB
pages-settings-settings-module-es2015.b1d6a58e304667332cea.js                                | pages-settings-settings-module                                |  18.10 kB
auth-auth-module-es5.0cd7e362716401cb882f.js                                                 | auth-auth-module                                              |  15.26 kB
auth-auth-module-es2015.0cd7e362716401cb882f.js                                              | auth-auth-module                                              |  14.53 kB

The Initial Total size is the sum of all Initial Chunk Files (both es5 and es2015). It is misguiding.
Wouldn't be better if we had Initial Total Sizes for different kinds of ECMAScript targets?

🌍 Your Environment


Angular CLI: 11.0.0-rc.2
Node: 12.13.1
OS: win32 x64

Angular: 11.0.0-rc.3
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Ivy Workspace: Yes

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1100.0-rc.2
@angular-devkit/build-angular   0.1100.0-rc.2
@angular-devkit/core            11.0.0-rc.2
@angular-devkit/schematics      11.0.0-rc.2
@angular/cli                    11.0.0-rc.2
@schematics/angular             11.0.0-rc.2
@schematics/update              0.1100.0-rc.2
rxjs                            6.5.5
typescript                      4.0.3
@ngbot ngbot bot modified the milestone: needsTriage Nov 10, 2020
@ngbot ngbot bot modified the milestones: needsTriage, Backlog Nov 10, 2020
clydin pushed a commit that referenced this issue Nov 12, 2020
…ild output

```
Initial Chunk Files                      | Names                |      Size
main-es5.6f60fbc22c7e19b5d179.js         | main                 | 154.89 kB
main-es2015.6f60fbc22c7e19b5d179.js      | main                 | 135.87 kB
polyfills-es5.0351d1276e488726c8dc.js    | polyfills-es5        | 129.34 kB
polyfills-es2015.904e51532a46df6b991c.js | polyfills            |  36.12 kB
scripts.b7f93721b30caf483f97.js          | scripts              |   3.45 kB
runtime-es2015.76bfea807ccb0a24e182.js   | runtime              |   1.45 kB
runtime-es5.76bfea807ccb0a24e182.js      | runtime              |   1.45 kB
styles.3ff695c00d717f2d2a11.css          | styles               |   0 bytes

                                         | Initial ES5 Total    | 289.13 kB
                                         | Initial ES2015 Total | 176.88 kB
```

Closes #19330
clydin pushed a commit that referenced this issue Nov 12, 2020
…ild output

```
Initial Chunk Files                      | Names                |      Size
main-es5.6f60fbc22c7e19b5d179.js         | main                 | 154.89 kB
main-es2015.6f60fbc22c7e19b5d179.js      | main                 | 135.87 kB
polyfills-es5.0351d1276e488726c8dc.js    | polyfills-es5        | 129.34 kB
polyfills-es2015.904e51532a46df6b991c.js | polyfills            |  36.12 kB
scripts.b7f93721b30caf483f97.js          | scripts              |   3.45 kB
runtime-es2015.76bfea807ccb0a24e182.js   | runtime              |   1.45 kB
runtime-es5.76bfea807ccb0a24e182.js      | runtime              |   1.45 kB
styles.3ff695c00d717f2d2a11.css          | styles               |   0 bytes

                                         | Initial ES5 Total    | 289.13 kB
                                         | Initial ES2015 Total | 176.88 kB
```

Closes #19330

(cherry picked from commit 2a1b6b1)
@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 Dec 13, 2020
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.

2 participants