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

Bundle size is huge in version 0.3.1 #9

Closed
redsuperbat opened this issue Mar 26, 2021 · 3 comments
Closed

Bundle size is huge in version 0.3.1 #9

redsuperbat opened this issue Mar 26, 2021 · 3 comments

Comments

@redsuperbat
Copy link
Contributor

Tried upgrading from v 0.2.1 -> 0.3.1 and suddenly the bundle size of the vue3 component increased by 77kb (which is A LOT). Wondering if there is some exports configured incorrectly perhaps?

Version 0.3.1:
Screenshot from 2021-03-26 15-15-46

Version 0.2.1:
Screenshot from 2021-03-26 15-16-30

@Renovamen
Copy link
Owner

Oh, I see... I bundled the component using umd format since v0.3, which doesn't support tree-shaking. Maybe I should use es format. I'll have a try, thank you!

@Renovamen
Copy link
Owner

Now I move to rollup and the esm format bundle is available. In my test, the bundle size will not increase (that much). Could you take a look at v0.4.1?

Import the component in Vue 3 by:

import OhVueIcon from "oh-vue-icons/dist/v3/icon.es";

@redsuperbat
Copy link
Contributor Author

Perfect! Works as intended now!

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