radix-ui / icons

A crisp set of 15×15 icons designed by the @workos team.
https://radix-ui.com/icons
MIT License
2.16k stars 108 forks source link

Improve bundle size when only using a few icons #39

Closed rafgraph closed 3 years ago

rafgraph commented 3 years ago

Hi, great set of icons, however npm install @modulz/radix-icons and import { SunIcon } from '@modulz/radix-icons'; (using just 1 icon) adds 75KB to the production build (using create react app). This makes them kind of unusable as an npm install.

Consider making each icon its own file in the build process so can do something like import { SunIcon } from '@modulz/radix-icons/sun-icon';

vladmoroz commented 3 years ago

Hey, thanks for the report. This shouldn't happen, we will look into improving the bundle size with individual icons.

vladmoroz commented 3 years ago

@rafgraph we released 3.2.0 fixing this issue 🎉

rafgraph commented 3 years ago

Thanks @vladmoroz, I can confirm it works.

I don't know if you're taking requests for icons, but it would be great to have a data graph icon. There is a Table icon which I can use for data in table format, and it'd be great to have a corresponding data in graph format icon (maybe something with lines or bars).

peduarte commented 3 years ago

@rafgraph yep, we're open to requests! Can you create an issue? Cheers 🤜