Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NextJS testing & support #1917

Open
drew2g opened this issue Nov 7, 2022 · 2 comments
Open

NextJS testing & support #1917

drew2g opened this issue Nov 7, 2022 · 2 comments

Comments

@drew2g
Copy link

drew2g commented Nov 7, 2022

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
Copy link

any luck on that one?

@steveworkman
Copy link

This is being actively discussed by the Lit team here lit/lit#3589

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants