Skip to content
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

Is 2.8 KB correct? #174

Open
vltansky opened this issue Feb 11, 2022 · 3 comments
Open

Is 2.8 KB correct? #174

vltansky opened this issue Feb 11, 2022 · 3 comments

Comments

@vltansky
Copy link

vltansky commented Feb 11, 2022

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

@omgovich
Copy link
Owner

omgovich commented Feb 11, 2022

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.

@vltansky
Copy link
Author

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

@robinmetral
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants