-
-
Notifications
You must be signed in to change notification settings - Fork 507
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
Terrible Performance on lucide-solid library #2371
Comments
Oh, I've just realized after continuing my search on the topic that this is probably a known issue... there's a section in the docs where it says
I'm assuming that's exactly what's going on here... anyhow, is it too difficult to implement? Maybe I could give it a shot... Any tips or resources would be appreciated. |
There is an article at https://christopher.engineering/en/blog/lucide-icons-with-vite-dev-server/ that proposes a workaround. Hope it helps. |
@jamiemlaw thank you for the amazing resource! Although the article's workaround works, it unfortunately breaks Typescript so I'm not considering it seriously. I'd rather do the manual boring work of copy pasting the SVG's I need and maintain my own icon components. But there's a real opportunity to improve the library here, and it doesn't seems so hard. Cus if it's a VITE problem (and apparently on Porting the newest version of |
@jamiemlaw Our build process is based on the Thanks for reporting. I'm looking into it. |
Hi, @ericfennis, I don't wanna bother and I'm grateful for your work! But unfortunately I think we should reopen the issue. I hope I did something wrong with the test but it's pretty straight forward... I upgraded the lib to the latest version ( I then tested on exactly the version the fix got in ( in case there was any regression going on ) but it didn't work either |
Me to |
Might be interesting, the vite peopel are working on a rewrite of the bundler, it's called rolldown and will hopefully fix a lot of performance problems. Maybe someone wants to give it a try, maybe we don't have the issue with vite-rolldown? There was also a good talk about the internal reworkings of the bundlers at viteconf https://youtu.be/IjV0tLysXc0 |
Package
Version
0.427.0
Can you reproduce this in the latest version?
Browser
Operating system
Description
The
lucide-solid
lib is with a terrible performance because it is loading all the icons instead of only the ones the project is using...I created 2 repos to compare both
lucide-solid
andlucide-react
and the performance difference is really big.These repos were set up the same way, I used
bun create vite@latest
, deleted everything in theApp.tsx
and just added one icon.Results
Steps to reproduce
Just import any icon in a Vite SolidJS project from the
lucide-solid
library and see the Lighthouse Network tabChecklist
The text was updated successfully, but these errors were encountered: