Sign in
Log inSign up

How to split an existing AngularJS application into chunks?

Julian Finkler's photo
Julian Finkler
·Jun 14, 2018

We are developing an AngularJS application. We using webpack for bundling dependencies and ui.router for routing behaviour.

Since the output file is getting huge over time, we want to split all areas (admin, settings, orders etc.) in separate files and load them if needed in the specific area (=lazyload them).

With webpack chunk splits we can split the areas into different files, but how can we load them lazy and make sure that the routing work properly?

Thank you for your ideas :-)