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? #92

Open
wronco opened this issue Feb 26, 2022 · 5 comments
Open

Bundle size? #92

wronco opened this issue Feb 26, 2022 · 5 comments

Comments

@wronco
Copy link

wronco commented Feb 26, 2022

Describe the bug
My webpack bundle before adding this library is ~500k, and after adding it it's about 3mb. I'm certain I'm not using every single part of the library, but I haven't been able to figure out the proper webpack incantation that leaves the parts I'm not using out of the compiled bundle.

My application.js just imports the library like this:

import PolarisVue from '@hulkapps/polaris-vue';
import '@hulkapps/polaris-vue/dist/polaris-vue.min.css';
Vue.use(PolarisVue);

Is there a way to have webpack automagically leave out the parts of polaris-vue that my app does not use? I've thrashed around with babel.config.js but not made any progress.

@MurmeltierS
Copy link

I dont think this library is tree-shakeable.

@wronco
Copy link
Author

wronco commented Mar 1, 2022

@MurmeltierS thank you!

I'd like to contribute toward making this library tree shakeable. It would be a huge boon to my webpack config

@MurmeltierS
Copy link

@wronco sadly the maintainers aren't very communicative, as this seems to be a project mainly used internally at HulkApps.

@uttam-praella
Copy link
Contributor

@MurmeltierS @wronco Apologies for the delayed response, but we really appreciate contribution for this package, we are currently focusing on Vue 3 support.

We really want to manage this library for the community, at this stage we are short of hands but we will try to keep it more active as much as possible.

Thank you both.

@uttam-praella
Copy link
Contributor

@wronco If you still would like to contribute please feel free to open a Pull Request, we will implement it as soon as we can.

Thank you!

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