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

Any tips making the bundle smaller? #384

Closed
napalm272 opened this issue Aug 24, 2018 · 3 comments
Closed

Any tips making the bundle smaller? #384

napalm272 opened this issue Aug 24, 2018 · 3 comments
Labels

Comments

@napalm272
Copy link

When I include this library, my bundle size increased by about 500K. I'm using webpack 4 production build. Why is this library so big when it's just a wrapper around some APIs? Any tips on minimizing the bundle?

@davidchin
Copy link
Contributor

Hi @napalm272, all assets served by us will be gzipped, therefore the actual size increase should be around 100 kb. Having said that, we do have plans to reduce the raw file size - i.e.: removing some of the larger dependencies and splitting the bundle etc... Thanks for the feedback.

@steve-ross
Copy link

Likely lodash... either switching to lodash-es and importing individual methods or using the lodash webpack optimizer would help.

Check out how they did it in this PR for cornerstone: bigcommerce/cornerstone#1390

@jaybeecave
Copy link

Its lodash and rxjs. The webpack analyzer included with the latest build of stencil shows how bad it is. over 4mb.

Wish we could just have a proper API instead of

'X-API-INTERNAL': 'This API endpoint is for internal use only and may change in the future' headers as a safeguard to using API endpoints

The cart process atm is so convoluted with regards to picking a shipping method and payment method.

@dougep dougep closed this as completed Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

5 participants