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

Optimize package size #3

Closed
arjan-kitchenstories opened this issue Sep 17, 2021 · 2 comments
Closed

Optimize package size #3

arjan-kitchenstories opened this issue Sep 17, 2021 · 2 comments

Comments

@arjan-kitchenstories
Copy link

First of all, thank you for this port!

We would consider using the package if the bundle was smaller. Bundlephobia says it is 16KB large, while the underlying React library is around 3KB large.

Is there a way to optimize the output? 16KB for creating customized avatars unfortunately would be a dealbreaker in my case.

Thanks again

@mujahidfa
Copy link
Owner

HI @arjan-kitchenstories! Upon inspection, it seems like the 16kb size you're referring to on Bundlephobia is including Vue's bundle size (which is a dependency for vue-boring-avatars, as it should). If you go to the bottom of the page and hover over (self), you can see that the actual size is 3.41kb unzipped, which is a lot smaller than the React version at 14.9kb unzipped.

Vue version at 3.41kb unzipped:
image

vs

React version at 14.9kb unzipped:
image

The size that you see on the React version's Bundlephobia appears smaller because the author mistakenly omits React as a dependency when React should've been included.

image

TLDR; the Vue version's actual size are actually wayyy smaller than what you see on Bundlephobia since it includes Vue as a dependency.

Hope this addresses your concern!

@arjan-kitchenstories
Copy link
Author

@mujahidfa Thank you for the swift response, thank you for clarifying - I should have seen that. Makes sense, and great news about the actual size!

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

2 participants