react-colorful icon indicating copy to clipboard operation
react-colorful copied to clipboard

Is 2.8 KB correct?

Open vltansky opened this issue 2 years ago • 3 comments

In features section written that react-colorful size is 2.8 kb with a link to why react colorfull that have a compassion table with 4.5 kb gzipped

vltansky avatar Feb 11 '22 16:02 vltansky

Hi! 4,5 KB is the size of all components react-colorful provides (~13 color pickers and 1 text input). See https://github.com/omgovich/react-colorful/blob/master/src/index.ts

Most of the people use only HexColorPicker which costs about 2,8 KB (thanks to tree-shaking). Some of the pickers (such as HsvColorPicker) are even lighter.

omgovich avatar Feb 11 '22 20:02 omgovich

You should explain it in the readme, it can be confusing, as you are referencing this table right after writing 2.8 KB.

vltansky avatar Feb 12 '22 08:02 vltansky

From https://bundlephobia.com/package/[email protected]:

Bundlephobia's export analysis shows that all exports are 4.6 kB gzipped

Is Bundlephobia wrong or is there an issue with how this package does tree shaking?

robinmetral avatar Mar 02 '23 16:03 robinmetral