Code Splitting with Webpack and Aurelia for Lazy Loading


Just wanted to reference this great article about one way to “code split” your app for larger applications and lazy loading modules when needed. It’s working well for us and for sure has reduced the apps load time and size. Just a note on what happens when you do use it in the route, I’ve verified that it not only splits out the view/viewmodel from the route moduleId but also other child components too that aren’t already loaded in the app.bundles.js.

Webpack Vendor Bundle Is Tiny