I've got a pretty large application with around 30 feature modules (a number of which are lazy-loaded), and a number of those modules use some of angular materials components. I've read a number of articles and asked chatGpt about the best approach when importing angular material into my feature modules and it doesn't seem clear which is the best approach:
- Shared module - Import wherever needed. Will mean importing a lot of unused components into some feature modules. Ivy's tree-shaking should handle this for smaller bundle sizes for lazy loaded modules.
- Import specific components into feature modules. - Import only what's needed. We can be more clinical but much more difficult to maintain.
What would people suggest is the best approach?