cristovao-trevisan / svelte-icon

SVG [icon] string styler for svelte
https://cristovao-trevisan.github.io/svelte-icon/
MIT License
30 stars 6 forks source link

Migrate to sveltekit library #6

Closed cristovao-trevisan closed 1 year ago

nrthbound commented 1 year ago

Is Sveltekit specifically the reason why this won't work? I implemented this into a regular Svelte project and it worked fine, but with Sveltekit, the import simply returns the URL to the SVG instead of the actual SVG content itself. Would love to help with this, but no clue what's causing the issue yet.

cristovao-trevisan commented 1 year ago

@nrthbound, did you check the instructions on README? You need to import the svg as string, to do so in sveltekit you need to add a ?raw modifier at the end of the import.

This is issue has nothing to do with it, the migration is for bundling and docs, if the problem persist please open another issue

Note: This package does work with sveltekit as I use it many kit projects