JustinVoitel / svelte-hero-icons

Heroicons for SvelteKit (Project based on heroicons)
MIT License
119 stars 7 forks source link

No loader is configured for ".svelte" files: node_modules/svelte-hero-icons/dist/Icon.svelte #8

Closed wiesson closed 3 years ago

wiesson commented 3 years ago

I have updated svelte to

"@sveltejs/adapter-node": "^1.0.0-next.45",
"@sveltejs/adapter-vercel": "^1.0.0-next.28",

And I got this error:

.svelte-kit/output/server/app.js   1497.56 KiB

Run npm run preview to preview your production build locally.

> Using @sveltejs/adapter-vercel
 > node_modules/svelte-hero-icons/dist/index.js:1:17: error: No loader is configured for ".svelte" files: node_modules/svelte-hero-icons/dist/Icon.svelte
    1 │ import Icon from "./Icon.svelte"
      ╵                  ~~~~~~~~~~~~~~~

> Build failed with 1 error:
node_modules/svelte-hero-icons/dist/index.js:1:17: error: No loader is configured for ".svelte" files: node_modules/svelte-hero-icons/dist/Icon.svelte

I'm not sure what exactly has changed, but I think it's worth looking into it

half2me commented 3 years ago

I have the same issue. It was introduced in @sveltejs/kit version 1.0.0-next.162

JustinVoitel commented 3 years ago

@wiesson @half2me can you both try out version 3.0.0 ? Unfortunately I had to change the import of the Icon component, as I couldn't figure out how to export it as default :/

It is now separated from the Icons data:

import Icon from "svelte-hero-icons/Icon.svelte"
import {Annotation} from "svelte-hero-icons"
half2me commented 3 years ago

@JustinVoitel works fine, thanks :)