0

I checked some articles about rollup.js and looks like it is pretty interesting module loader with cool bundle possibility. But, actually, I didn't see how it can be configured to multiple angular 2 modules bundling. For example: I have 10 modules and 5 of them are lazy loaded. So they can be a splitted independent bundles that can be loaded async.

Is it possible to do with rollup.js? Thanks (because I really didn't found any information about that).

Velidan
  • 3,891
  • 2
  • 34
  • 63

1 Answers1

0

As for now, lazy loading rollup.js bundles with Angular 2 Router is not possible. rollup.js doesn't support code splitting yet, see this GitHub issue. Even when you create a separate bundle for your module, it can't be consumed properly. Angular 2 uses SystemJS to lazy load modules. rollup.js doesn't use the complex SystemJS format.