shinokada / svelte-awesome-icons

Font Awesome SVG icon components for Svelte. Svelte-Awesome-Icons support major CSS frameworks using the class props.
https://svelte-awesome-icons.codewithshin.com
MIT License
15 stars 2 forks source link

[BUG]: #1

Closed seunex17 closed 1 year ago

seunex17 commented 1 year ago

Description of the bug

I try using this package on sveltekit but i get an error image

Am not sure if this is compatible with sveltekit

Steps To Reproduce

  1. Install in a sveltekit app
  2. Use the icon package

Additional Information

No response

shinokada commented 1 year ago

I think your installation has a problem.

Try:

npm create svelte@latest icon-test
cd icon-test
pnpm i
pnpm i -D svelte-awesome-icons 

And add the following to src/routes/+page.svelte

<script>
    import { ToiletsPortableSolid, StarHalfRegular, AppleBrand } from 'svelte-awesome-icons';
</script>

<ToiletsPortableSolid />
<StarHalfRegular />
<AppleBrand />