These are chat archives for AngularClass/angular2-webpack-starter

Jan 2017
Jan 27 2017 12:37
Could you please tell me, What is the difference between AoT and Webpack, Which is good in performance?
Jan 27 2017 14:22
@VaseemMalik AFAIK, AOT is not an alternative to Webpack at all. It's the difference between Angular AOT template compilation instead of Angular JIT template compilation. When templates are compiled AOT / compile time that enables far more strict / precise code error/warning analysis, pre-compiled (== faster loading) templates, and smaller downloaded package due to absence of Angular compiler and three shaking. Unfortunately for us, we could not turn AOT compiling currently on on a rather large project. Reason being dozens of AOT compilation errors with quite confusing error messages I couldn't sort out. AOT compiler found also a lot of those errors I was able to fix, but had not enough time to fix those mystical ones.
JIT compilation happens when you open your Angular app with a browser. Or load a lazy-loaded module. That takes several seconds for our app, and so we should see some ~50% time reduction / ~200% speed increase with AOT , but it's currently not possible for us, unfortunately. Obviously compiling production builds with AOT will take somewhat longer than without AOT, but that shouldn't matter in any case. For development builds you are not using AOT anyway.