-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All icons load automatically #2
Comments
Yeah, I believe this is related to sveltejs/kit#2612 Personally I see this in dev mode but not in production. Though even turning on the experimental setting mentioned in that issue, I see all the icons being prebundled together into one big file in dev mode. I'm not sure if there's an alternate way of managing the exports that would fix this--it needs some more investigation. |
Ah, okay, thanks for pointing me at the SvelteKit issue - I didn't see that one. I'm also only seeing it in dev, and I only noticed it because of one weird use case which required full refreshes |
Importing each icon directly doesn't load all icons: |
Closing, as this isn't a heroicons problem. |
So, this may be a Svelte thing, a SvelteKit thing, or ... some other thing. But, I'm using this library in a project, and I've imported a couple of icons:
import { MenuIcon, UserIcon, XIcon } from "@rgossiaux/svelte-heroicons/solid";
However, on running my application, I see that all heroicons (and headlessui components, incidentally) are loaded at once on page refresh in my dev server.
I see in my network explorer that these files are imported:
http://localhost:8080/node_modules/@rgossiaux/svelte-headlessui/index.js?t=1645717182624
http://localhost:8080/node_modules/@rgossiaux/svelte-heroicons/solid/index.js?t=1645717182624&v=9b4f8992
and each of those then re-export all components in the projects.
Is that intended?
The text was updated successfully, but these errors were encountered: