Check out myAngular article series with live demos and Facebook group Angular - Advanced Topics

Angular Lazy Loading with Bazel and Rollup

Torgeir "Tor" Helgevold
- JavaScript Developer and Blogger
Published: Sun Feb 04 2018

Here is an early prototype of an Angular application with lazy loading, built using Bazel and Rollup.

The prototype code can be downloaded from Github.

The sample builds on one of my previous articles.

The main difference between this and the previous sample is that I am using Bazel to build the sample.

I have also simplified the SystemJS setup to require fewer mappings.

This is just a rough prototype, but I will evolve it and clean it up over time.

Basic Instructions

Build and bundle the sample by running:
npm run build
Launch the sample in a browser by running:
npm run serve

Lazy Loading

By observing the http requests in the browser network tab, you will be able to see that all nav points are lazy loaded based on routing.

If you liked this article, share it with your friends on social media:

We also have a new Facebook group about advanced Angular topics.

I invite you to follow me on twitter