Reputation: 61
I am working on an angular2 application, where I want to use lazy loading of feature modules. Separating modules as feature modules and loading them on demand works fine in dev mode, but how do I bundle feature modules separately(using systemjs) and load them in production?
Upvotes: 2
Views: 320
Reputation: 96959
It's hard to give any advice from such short description. SystemJS has a tool called SystemJS Builder that can bundle multiple SystemJS modules into a single bundle (a single file with multiple modules).
Then SystemJS has an option bundle
option to load bundles made by SystemJS Builder.
See a similar question with example of SystemJS Builder: Build Angular2 HTML and TypeScript to a single file
Upvotes: 1