You can use Dynamic component loader service
- Which respect component module, providers, context
Use "defer" strategies
- Wrap "heavy" libraries with async conditions
- Meaning, wrap your function that need third party libraries in a Promise or Observable and use RxJS to defer the execution. Only executed when subscribed to.
Do lazy loading on router resolver level.