x)
- [ ] new
- [x] build
- [ ] serve
- [ ] test
- [ ] e2e
- [ ] generate
- [ ] add
- [ ] update
- [ ] lint
- [ ] xi18n
- [ ] run
- [ ] config
- [ ] help
- [ ] version
- [ ] doc
No Idea
I created two new projects, one with enable-ivy and one without, and without adding any change, the ivy project was larger by 60kB compared to non ivy project.
Following is how I created and the build results
> npx -p @angular/[email protected] ng new ivy-project --enable-ivy
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
> ng build --prod
Date: 2019-03-14T19:09:59.899Z
Hash: fa04754e6fe3253b3565
Time: 23401ms
chunk {0} runtime.26209474bfa8dc87a77c.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.5c2b5594965c4d4fca3d.js (main) 306 kB [initial] [rendered]
chunk {2} polyfills.abcb3479eb0ca86ae8d5.js (polyfills) 41 kB [initial] [rendered]
chunk {3} polyfills.es5.99545074c68fda00494c.js (polyfills.es5) 61.9 kB [initial] [rendered]
chunk {4} styles.3ff695c00d717f2d2a11.css (styles) 0 bytes [initial] [rendered]
> npx -p @angular/[email protected] ng new non-ivy-project
? Would you like to add Angular routing? Yes
? Which stylesheet format would you like to use? CSS
> ng build --prod
Date: 2019-03-14T19:15:16.351Z
Hash: 7ac74b00f6031d2ed8bb
Time: 23603ms
chunk {0} runtime.26209474bfa8dc87a77c.js (runtime) 1.41 kB [entry] [rendered]
chunk {1} main.54a35eb644a6e8e95684.js (main) 240 kB [initial] [rendered]
chunk {2} polyfills.abcb3479eb0ca86ae8d5.js (polyfills) 41 kB [initial] [rendered]
chunk {3} polyfills.es5.99545074c68fda00494c.js (polyfills.es5) 61.9 kB [initial] [rendered]
chunk {4} styles.3ff695c00d717f2d2a11.css (styles) 0 bytes [initial] [rendered]
Angular CLI: 8.0.0-beta.5
Node: 11.6.0
OS: darwin x64
Angular: 8.0.0-beta.8
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.14.0-beta.5
@angular-devkit/build-angular 0.14.0-beta.5
@angular-devkit/build-optimizer 0.14.0-beta.5
@angular-devkit/build-webpack 0.14.0-beta.5
@angular-devkit/core 8.0.0-beta.5
@angular-devkit/schematics 8.0.0-beta.5
@angular/cli 8.0.0-beta.5
@ngtools/webpack 8.0.0-beta.5
@schematics/angular 8.0.0-beta.5
@schematics/update 0.14.0-beta.5
rxjs 6.4.0
typescript 3.2.4
webpack 4.29.6
Anything else relevant?
The size savings from Ivy are in the generated JS files for your templates. Given some size of HTML templates, the prior compiler created much larger JS output size compared with Ivy.
If you don't have some critical mass of HTML templates, you won't see that size improvement.
Note that there is also a known issue with the framework code itself currently being larger under Ivy than before. We plan to fix this before 8.0 final ships.
Closing this as the original issue https://github.com/angular/angular/issues/28077 should have been addressed.
Thanks.
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._
Most helpful comment
The size savings from Ivy are in the generated JS files for your templates. Given some size of HTML templates, the prior compiler created much larger JS output size compared with Ivy.
If you don't have some critical mass of HTML templates, you won't see that size improvement.
Note that there is also a known issue with the framework code itself currently being larger under Ivy than before. We plan to fix this before 8.0 final ships.
See: https://github.com/angular/angular/issues/28077