You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've recently purchased the Pro version of hugeicons (@hugeicons/react) and using it in a NextJS app. And I've noticed a huge increase in bundle size because of it.
In particular our minified+gzipped bundle went from 400kb to 600kb, basically a 50% increase just because of the icons we use.
So I went through the rabbit hole, and apparently it's because every icon included in the app comes with all variants, automatically.
Ex: I want to use ArrowRight01Icon, hugeicons includes all stroke, solid, twotone, bulk variants, even though they're never used.
Can you do anything about it? This is a deal breaker for us (and I'm sure a lot of other projects).
The text was updated successfully, but these errors were encountered:
@alea-git We have published @hugeicons/[email protected] that supports tree-shaking for icons and variants, you can check it and let us know if you face any issues.
You can now import icons that include all variant as:
Home01Icon
Or you can import single variant like:
Home01IconBulkRounded
Home01IconDuotoneRounded
Home01IconSolidRounded
Home01IconSolidSharp
Home01IconSolidStandard
Home01IconStrokeRounded
Home01IconStrokeSharp
Home01IconStrokeStandard
Home01IconTwotoneRounded
Hi!
I've recently purchased the Pro version of hugeicons (@hugeicons/react) and using it in a NextJS app. And I've noticed a huge increase in bundle size because of it.
In particular our minified+gzipped bundle went from 400kb to 600kb, basically a 50% increase just because of the icons we use.
So I went through the rabbit hole, and apparently it's because every icon included in the app comes with all variants, automatically.
Ex: I want to use
ArrowRight01Icon
, hugeicons includes allstroke
,solid
,twotone
,bulk
variants, even though they're never used.Can you do anything about it? This is a deal breaker for us (and I'm sure a lot of other projects).
The text was updated successfully, but these errors were encountered: