spectrum-web-components icon indicating copy to clipboard operation
spectrum-web-components copied to clipboard

Can't import components into an Angular 17 project.

Open bzupancic opened this issue 1 year ago • 1 comments

Code of conduct

  • [X] I agree to follow this project's code of conduct.

Description of issue

When attempting to import a component into my Angular project via import { Switch } from '@spectrum-web-components/switch' I receive the error message:

This likely means that the library (@spectrum-web-components/bundle) which declares Switch is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

I can use <script src="https://jspm.dev/@spectrum-web-components/switch.js" type="module" async></script> but there has to be a better way...

bzupancic avatar Feb 01 '24 23:02 bzupancic

Does this process still benefit from https://angular.io/api/core/CUSTOM_ELEMENTS_SCHEMA?

Would you be able to share more info about what it means to be "compatible with Angular Ivy."?

Westbrook avatar Feb 02 '24 18:02 Westbrook