2

I can't really get why are services, that are marked with providedIn:root and that are used only in lazy-loaded modules aren't tree shaked. We don't have our lazy modules in initial bundle but have services that are used in them, why? And how does angular even include them in the bundle if the module file only being downloaded when loaded with loadChildren?

Iceneo
  • 51
  • 3
  • Do you have a sample repro that illustrate your problem ? Services used in lazy loaded modules/components should be in the lazy loaded bundles. – Matthieu Riegler Jul 20 '23 at 10:51

0 Answers0