Closed devinschumacher closed 3 days ago
Duplicate #2590.
ty @benjamincanac
Can you have a look in your lockfile to make sure you're using the latest @nuxt/icon@1.7.2
?
Can you have a look in your lockfile to make sure you're using the latest
@nuxt/icon@1.7.2
?
pnpm-lock.yaml is showing '@nuxt/icon@1.6.1'
i can upgrade it.
Q: for future reference, how would i know to know that i need to update this to fix the issue? is there any way to figure that out (other than coming to the issues board)?
edit: after updating to 1.7.2 im still getting WARN [Icon] failed to load icon custom-soundcloud
in console, and icon is not displaying on page
Well, this is an issue with @nuxt/icon
not @nuxt/ui
which just installs the @nuxt/icon
module.
Would you mind providing a minimal reproduction? I can't seem to reproduce on my end.
However, in this reproduction the bug happens when prefixes have a -
inside. It doesn't happen for your specific case 🤔
Hi @benjamincanac,
I don't know why and what, but there are quite some things going wrong when you use custom icons. If I got it right, i-
is being used for the internal API of nuxt/icons. For custom icons you shouldn't add i-
.
I've tried quite a couple of things now, and as mentioned in #2590 on dev it is working different then on prod.
It was just fixed in https://github.com/nuxt/icon/releases/tag/v1.7.5, can you try it?
@stijns96 No you can also use i-
prefix for custom icons, it's unrelated.
It was just fixed in https://github.com/nuxt/icon/releases/tag/v1.7.5, can you try it?
awesome. fixed
Environment
Version
3.0.0-alpha.8
Reproduction
trying to make and use a custom icon:
assets/icons/soundcloud.svg
nuxt.config.ts
in my component SFooter.vue:
Description
I get the warning in console:
WARN [Icon] failed to load icon custom:soundcloud
and nothing displaying on front end
Additional context
No response
Logs