This will build the application with Ivy and leverage all the optimizations it provides.
Benefits of using Ivy
Ivy comes with many improvements, which include the following:
AOT compilation: Ahead-of-time (AOT) compiles an app before it goes to a runtime environment like a browser. AOT reduces the load on the browser since it precompiles the app before it reaches the browser.
Smaller bundle size: Bundle size is the amount of code a browser will have to download to load our app. Ivy downsizes the bundle size through AOT and tree-shaking.
Improved speed: Angular apps load more quickly than before, thanks to a smaller bundle size and the tree-shaking capability of Ivy.
Ivy is much faster than its predecessor because it now ships with ahead-of-time (AOT) compilation by default. AOT enables the browser to load the application quickly without downloading the compiler and building the app itself.
Just-in-time (JIT) compilation was the default compiling mechanism in previous versions of Angular, through which the browser would download the compiler and build the app. However, this process was inefficient because it was slow and burdened the browser.
Note: Angular has just one compiler. AOT and JIT just refer to how and when we use the compiler. With AOT, the compiler runs at build time. With JIT, the compiler runs at runtime.
The Ivy engine is a critical part of Angular. Hence, having a basic idea of what it does is important.
Conclusion
By addressing performance bottlenecks and introducing innovative compilation techniques, Ivy has established itself as a key feature of Angular’s architecture. AOT compilation combines intelligent code optimization through tree-shaking, and demonstrates Angular’s commitment to delivering high-performance applications. These improvements not only benefit end-users through faster load times and better runtime performance but also enhance the developer experience with improved tooling and debugging capabilities.