Older versions of Angular have relatively large file size of the final bundles compared to React and Vue.
The performance of the Angular runtime is quite good but the loading time is longer because of the large file. So what the Angular team is doing to solve the large size of the final bundles?
What is IVY?
Before Angular 8, the frame work used View Engine as the renderer, IVY is in experimental mode behind an optional flag, with Angular 9 IVY is the default compiler.
IVY is a complete rewrite of the Angular renderer which is the simply the part of Angular that transforms your Angular Templates into JavaScript code.
Angular components are a mix of TypeScript code, HTML and CSS. TypeScript is a superset of JavaScript, that needs to be compiled into JavaScript before it can be consumed by a web browser.
Angular previously made use of View Engine to transform TypeScript to JavaScript. The Angular View Engine transforms the templates and components to HTML and JavaScript so that the browser can render them.
The IVY compiler is abstracted from developers and will replace View Engine so what you know about Angular is still valid. Angular 8 allows developers to play with IVY but with Angular 9, IVY is the default renderer.
The IVY compiler outputs much smaller JavaScript bundles, so IVY solves Angular's bundle problems.
IVY is enabled default:
// tsconfig.json{"angularCompilerOptions": {"enableIvy": false}}

Comments
Post a Comment