I was investigating problem described here: https://github.com/angular/angular/issues/53592 as I have run into this for our 5 components. I have noticed (when debugging the angular core code) that the types compared to raise the warning are different and reference different constructors:
The constructors looks like this (notice the extends part and different line numbers):
Additional info:
- we are using ang 17 (just in the process of upgrade) and material 16
- in code the problematic components are exported only once
- all problematic components are ‘dialog’ ones, so being used by DialogService from the same module/ entry point
- other (non-problematic) components seem to be in the javascript only once (search for class XXXComponent)
Why Angular generates two components in the target javascript file?
What needs to be done, so there is only one occurrence generated?