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

Add a check of the bundle size to ensure it doesn't get too large #48

Open
tilanka opened this issue Jul 24, 2019 · 5 comments
Open

Add a check of the bundle size to ensure it doesn't get too large #48

tilanka opened this issue Jul 24, 2019 · 5 comments
Labels
Platform All things related to the Webpack, builds, testing, etc.

Comments

@tilanka
Copy link

tilanka commented Jul 24, 2019

We should ensure this library never gets too large by implementing a check against the bundle size. Can potentially do it via inspecting the outputs of webpack-bundle-analyzer but otherwise there are other npm packages that do this

Inspired by https://material-ui.com/guides/minimizing-bundle-size/

@ricominten
Copy link
Collaborator

@tilanka Just out of curiosity, what is considered too large?

@tilanka tilanka added the enhancement New feature or request label Jul 24, 2019
@tilanka
Copy link
Author

tilanka commented Jul 24, 2019

@ricominten good question, I think that's up to us to define really. A single component would be a few kB or less ideally

@jennasalau
Copy link
Contributor

This is a good call out.

I'm not sure how we can measure this at a component level in this repo. Each component is its own package which means consumers can opt-in to only the components they need. It also means we are not using web-pack any where as this would live at the project level.

Perhaps we can write a script that measures the "file size" of each of the components "lib" folder?

@tilanka
Copy link
Author

tilanka commented Aug 8, 2019

yeah that would be how it would have to work. I'll take a look at some options and come back with an approach

@jennasalau
Copy link
Contributor

Atlassian has some documentation that might help accelerate your research.

https://atlaskit.atlassian.com/docs/guides/bundle-size

@ricominten ricominten added Platform All things related to the Webpack, builds, testing, etc. and removed enhancement New feature or request labels Aug 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Platform All things related to the Webpack, builds, testing, etc.
Projects
None yet
Development

No branches or pull requests

3 participants