SSR Error #123
-
Hello, I'm using @iconify/svelte for Icons but can't seem to publish/download my website. Error
my js code in componentOriginally I only imported import Icon, { _api } from "@iconify/svelte";
import fetch from "node-fetch";
_api.setFetch(fetch); how I use the icon in html<Icon icon="{feature.icon}" height="48" /> any idea how to make it work? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Tested this import and it seems to work: No need for importing |
Beta Was this translation helpful? Give feedback.
-
That's a really neat library; thanks for bringing it to my attention. I've been importing all of fontawesome just for a few components 😰 . This builds them out as static SVGs Much better 🚀 |
Beta Was this translation helpful? Give feedback.
Tested this import and it seems to work:
import Icon from "@iconify/svelte/dist/Icon.svelte";
From this issue
No need for importing
fetch
or_api