I have an angular library that has a react component inside it. I want my react component ABC to use an angular component XYZ using createCustomElement. The createCustomElement logic is inside an app module later and is not present in my library, I have added polyfills so that the ABC does not throw error and the build runs successfully. Before running the build, it shows no error, on hovering over <xyz></xyz> in abc.tsx file, it even displays that it is present JSX.IntrinsicElements["custom-element"]: any This is my polyfill code: declare global { namespace JSX { interface IntrinsicElements { "custom-element": any; } } } It is correctly added in my angular.json as well. How to resolve this issue so that my build runs successfully? Continue reading...