Skip to content

Repo for demonstrating incorrect bundling of lazy routes from library project

Notifications You must be signed in to change notification settings

RobM-ADP/lazy-load-bug

Repository files navigation

Lazy load bundle issue

When lazy loading bundles via a library project as described here: angular/angular-cli#6373 (comment) the bundling of the routes is incorrect.

Clone and run this repo and you will notice that while the wrapper modules are correctly lazy loaded, the actual modules and components from both routes from the library are all bundled into the common.js bundle which completely defeats the purpose of lazy loading as loading either route, loads all the components/modules from all routes within the same library. It seems that when lazy loading routes from a library, each route would need to be its own library or secondary entry point in order for the bundling to work correctly which doesn't make sense when using the libraries for feature development as a feature could have mutliple routes that need to be lazily loaded.

About

Repo for demonstrating incorrect bundling of lazy routes from library project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •