Is AOT better than JIT?

Loading in AOT is much quicker than the JIT because it already has compiled your code at build time. JIT is more suitable for development mode. AOT is much suitable in the case of Production mode. Bundle size is higher compare to AOT.5 Kas 2020

Read more

How do I enable AOT compilation?

The first step, as it happens, is to run npm install @ngtools/webpack . Next, you have to configure Webpack properly. In this step, you want to configure AngularCompilerPlugin which comes with @ngtools. Using configuration parameters you will set up locations of tsconfig and entry files.

Read more