Lots of separate requests when using lucide-solid during devmode
I tried to use lucide-solid, and it works as expected.
My problem is that it downloads each icon JSX file separately during development, slowing down the initial page load, and completely "ruining" the Network view:
Is there a way to load all icons at once during development?
I tried some recommendations like
but none worked.
Thanks.
3 Replies
This is a problem with Vite and Lucide Icons when you do named imports. This happens in tabler icons too
The doc actually has a section that calls this out: to improve Vite dev server performance, import directly from "lucide-solid/icons" folder https://lucide.dev/guide/packages/lucide-solid
So you should import directly the icons you need.
Or use solid-icons