Just-in-Time (JIT) vs Ahead-of-Time (AOT) compilation


    Just-in-Time (JIT) vs Ahead-of-Time (AOT) compilation



    JIT - Compile TypeScript Just in time for executing it.
    1. Compiled in the browser.
    2. Each file compiled separately.
    3. No need to build after changing your code and before reloading the browser page.
    4. Suitable for local development.


    AOT - Compile TypeScript during the build phase.
    1. Compiled by the machine itself, via the command line (Faster).
    2. All code compiled together, inlining HTML/CSS in the scripts.
    3. No need to deploy the compiler (Half of Angular size).
    4. More secure, original source not disclosed.
    5. Suitable for production builds.

      Comments