According to this tutorial we need to set the tsconfig.json compiler option allowJs to true and include CUSTOM_ELEMENTS_SCHEMA
tsconfig.json
allowJs
true
CUSTOM_ELEMENTS_SCHEMA