themesberg / flowbite-svelte-icons

Official library for the free and open-source collection of over 430+ SVG icons for Flowbite and Svelte
https://flowbite-svelte.com/icons/svelte-4
MIT License
66 stars 10 forks source link

SvelteKit Support? #12

Closed nash-an closed 1 year ago

nash-an commented 1 year ago

Not sure what's happening, but latest version (0.4.3) on SvelteKit has no exported values.

Within +layout.svelte I am unable to import anything from the library.

import { Icon } from 'flowbite-svelte-icons';
import { AddressCardSolid } from 'flowbite-svelte-icons';

Neither of these imports work. The values just don't exist.

shinokada commented 1 year ago

Please read the docs.

You don't need to import Icon any more.

<script>
  import { AddressCardSolid } from 'flowbite-svelte-icons';
</script>

<AddressCardSolid />

The compiled size is much smaller now.

nash-an commented 1 year ago

Sorry, it was just meant to be an example as nothing seems to work for me.

Error: <ChartPieSolid> is not a valid SSR component. You may need to review your build config to ensure that dependencies are compiled, rather than imported as pre-compiled modules. Otherwise you may need to fix a <ChartPieSolid>.

I'm able to import things now... but I'm getting this error. I have it installed as a dev dependency, so that's not the issue.

shinokada commented 1 year ago

Which version are you using?

nash-an commented 1 year ago

0.4.3

Running npm run check gives me this error

Error: Module '"flowbite-svelte-icons"' has no exported member 'ChartPieSolid'. (ts)
shinokada commented 1 year ago

Can you share your GitHub repo or stackbiltz?

nash-an commented 1 year ago

I'll try to reproduce the issue in a smaller repo, I cannot share the full one I'm working with.

shinokada commented 1 year ago

Please make sure to follow the installation guide at https://flowbite-svelte-icons.vercel.app/