-
SummaryI've used lots of declarations in a third-party library, like:
And then used it in It works perfectly on the Next.js development server; but when deploying it on Vercel the icons don't show up, even though they appear in the Vercel deployment log. ![]() Additional information
ExampleNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 7 replies
-
Haven't figured out yet. |
Beta Was this translation helpful? Give feedback.
-
import flower from "../icons/flower.webp"; work in dev (Next.js handles them dynamically), but in production (e.g., on Vercel), images must be served from the Fix:
< img src="/icons/flower.webp" alt="Flower" / > Or in CSS: background-image: url('/icons/flower.webp'); Avoid using |
Beta Was this translation helpful? Give feedback.
@icyJoseph Confirmed: it works using the
typeof
trick to conditionally use thesrc
property.