DEV Community

Discussion on: Faster App Starts With Prepack & Webpack

Collapse
 
kayis profile image
K

I don't know much about Angulars AoT compilation.

The few things I found right now were template pre-compilation and tree-shaking, so I don't know if it can do more. So it seems it replaces template strings with functions and removes dead-code.

Prepack runs you whole bundle once (in node.js) and replaces function calls and calculations with assignments, but it wouldn't remove functions you didn't call (no tree shaking).

I could imagine that if you got static templates, that you create at start-up time and if you have much setup code in angular, this could still improve everything a bit.

Collapse
 
spock123 profile image
Lars Rye Jeppesen

Thank you for your answer... it's very interesting