What AOT and JIT and which is used by Ionic?

Technology CommunityCategory: IonicWhat AOT and JIT and which is used by Ionic?
VietMX Staff asked 3 years ago

Since Ionic 1-3 are majorly dependent on Angular. The Compilation options that were available for Angular were available for Ionic too.

  1. JIT stands for Just in Time compiler. It is a type of compilation where a compilation of the app happens in the browser at runtime.
  2. AOT stands for ahead of time compiler. It is a type of compilation that compiles the app at build time.
  3. If we just use ionic cordova build platform (android or iosthen it will be JIT if we use prod flag I, E ionic cordova build platform –prod then it will use AOT.

An app that is built with JIT is slow as compared to AOT. But compilation time required for AOT is more than JIT. So for a quick checks use JIT and for a final deployment use AOT.