custom-elements-everywhere icon indicating copy to clipboard operation
custom-elements-everywhere copied to clipboard

NextJS testing & support

Open drew2g opened this issue 2 years ago • 2 comments

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

drew2g avatar Nov 07 '22 17:11 drew2g

any luck on that one?

RomainSF avatar Dec 14 '22 02:12 RomainSF

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

steveworkman avatar Jan 19 '23 22:01 steveworkman