webcomponents / custom-elements-everywhere

Custom Element + Framework Interoperability Tests.
https://custom-elements-everywhere.com
Other
1.19k stars 103 forks source link

NextJS testing & support #1917

Open drew2g opened 1 year ago

drew2g commented 1 year ago

Nextjs is a popular frontend framework and there are no tests available for it here. I've tried importing a lit web component that imports pngs using @lit-labs/react with no success due to Next's image processing quirks.

I got stopped by this error TypeError: Unknown file extension ".png" for /Users.../assets/user-black.png

Then by this error after adding 'next-images' to my next.config.js Image import "../../../assets/lock-black.png" is not a valid image file. The image may be corrupted or an unsupported format.

Maybe there needs to be a @lit-labs/next specific wrapper package that aids in the loading of images for Next esm or some documentation on how to configure next.config.js to make this work

RomainSF commented 1 year ago

any luck on that one?

steveworkman commented 1 year ago

This is being actively discussed by the Lit team here https://github.com/lit/lit/issues/3589