codefeathers / rollup-plugin-svelte-svg

Import SVG files as Svelte Components
MIT License
75 stars 13 forks source link

Loading module from “http://localhost:3030/static/image.svg.svelte” was blocked because of a disallowed MIME type #29

Closed Valexr closed 2 years ago

Valexr commented 2 years ago

SvelteKit booked import with .svg.svelte extensions...

MKRhere commented 2 years ago

Can you make a simple repo where I can try this out? I've not used SvelteKit before, and setting kit.vite seems to override SvelteKit's internal vite config and breaks all types of things.

Valexr commented 2 years ago

It's very simple... Just:

MKRhere commented 2 years ago

To import them as Svelte components, your SVG should be in src. Not static.

Valexr commented 2 years ago

ok