bundlesize
bundlesize copied to clipboard
v1.0.0 Roadmap
Hi π
I built bundlesize in June 2017 to solve a problem I had at the time.
Since then, it has become pretty popular. Here's are some crazy numbers:
- Bundlesize does about 50k builds every week
- 1.5M builds in it's lifetime (2 years)
- There are 10.8K public repositories (and unknown number of private repos π€·ββ) that have bundlesize as a dependency
- Used by popular open source libraries like Bootstrap, lighthouse, styled-components, emotion, redux-saga, react-apollo, popper and a bunch more!
But I haven't been doing a good job at maintaining as after I moved projects. I'm really thankful to the ~50 contributors that have been generous with their time in improving bundlesize.
Maintaining an open source project requires consistent effort, not just with adding code, but also code reviews and support. I haven't been able to keep up with the changes in my career.
The Chrome Performance Fund might be able to help with that by paying contributors for their time π
There are a few themes that come up in the issues on the regular. Please give a π to the problems you have faced and would like to see solved.
Feel free to create an issue to suggest additions to this roadmap as well
Deeper GitHub integration
Right now, bundlesize requires a manual configuration with copy-pasting access tokens, which
- Prevents some folks from using it (Don't know how to, Don't have access, admins don't allow, etc.)
- Is very difficult to debug when it doesn't work.
Using GitHub Apps + Checks will solve both of these problems and allow us to use improved UX
Related issues: https://github.com/siddharthkp/bundlesize/issues/223 https://github.com/siddharthkp/bundlesize/issues/203 https://github.com/siddharthkp/bundlesize/issues/148 https://github.com/siddharthkp/bundlesize/issues/29
Better configuration
bundlesize started with an array in package.json
, this did not scale well π
We now have inconsistent support in package.json
and the CLI (used with npx). One of the most popular request is to add a config file.
-
We can tackle all these problems with a common format over all 3 mediums (most probably using
cosmiconfig
) -
On the same theme, better support toolkits where you don't have direct access to the files. Example: create-react-app, nextjs
Related issues: https://github.com/siddharthkp/bundlesize/issues/304 https://github.com/siddharthkp/bundlesize/issues/256 https://github.com/siddharthkp/bundlesize/issues/225 https://github.com/siddharthkp/bundlesize/issues/206 https://github.com/siddharthkp/bundlesize/issues/173 https://github.com/siddharthkp/bundlesize/issues/162
Better error handling
Because bundlesize uses access token from environment variables, it can fail given any of these scenarios:
- Token was not set correctly
- Token does't have the correct permissions attached to it
- Token expired
- Incorrect parameters sent to GitHub for status
All of these scenarios result in a 404: Not Found error
or the build hanging in CI which is not helpful. (GitHub returns 404 instead of 401)
We can take care of most of these in the tool itself and give more helpful error messages that can help folks fix their issue.
Related issues: https://github.com/siddharthkp/bundlesize/issues/93 https://github.com/siddharthkp/bundlesize/issues/245 https://github.com/siddharthkp/bundlesize/issues/280 https://github.com/siddharthkp/bundlesize/issues/284 https://github.com/siddharthkp/bundlesize/issues/308
Remove false negatives
Like any software, bundlesize has bugs. The scariest of them is when bundlesize should have failed but does not fail the build.
This stems from returning the wrong flag for a CI environment OR reading the file size incorrectly.
A few tests will take us a long way!
Related issues: https://github.com/siddharthkp/bundlesize/issues/188 https://github.com/siddharthkp/bundlesize/issues/229 https://github.com/siddharthkp/bundlesize/issues/159 https://github.com/siddharthkp/bundlesize/issues/281 https://github.com/siddharthkp/bundlesize/pull/267
Support bundlesize in forks
In every CI system, forks don't get environment variables which makes a lot of sense. This also means bundlesize can't report on pull requests submitted to the source repository. (Basically, every external contribution to an open source project)
I don't have a solution yet, but we might have to think of alternate ways of reporting like comments
Related issues: https://github.com/siddharthkp/bundlesize/issues/219
I know @mxstbr and @developit have run into this amongst others
Better reporting
bundlesize does an okay job at reporting when there are multiple files involved.
- The messages in GitHub status should be better
- Fix the
details
link when there are too many files
Related issues: https://github.com/siddharthkp/bundlesize/issues/182 https://github.com/siddharthkp/bundlesize/issues/208 https://github.com/siddharthkp/bundlesize/issues/164 https://github.com/siddharthkp/bundlesize/pull/285
Make it easier to support more CI environments
Codefresh: https://github.com/siddharthkp/bundlesize/issues/236 Teamcity https://github.com/siddharthkp/bundlesize/issues/257 Sephamore https://github.com/siddharthkp/bundlesize/issues/176 AppVeyor https://github.com/siddharthkp/bundlesize/issues/234 GitLab https://github.com/siddharthkp/bundlesize/issues/19
Plugin system to extend/tweak core functionality via plugins
Every once in a while there's a feature request (or even a pull request) that makes a lot of sense for the contributor and their team but doesn't sit well in bundlesize core.
Example: Add check for minSize; Warn instead of failing build
It would make a lot of sense if you can intercept bundlesize and use it's output to set the message that fits your need
Related issues: https://github.com/siddharthkp/bundlesize/issues/207 https://github.com/siddharthkp/bundlesize/issues/271 https://github.com/siddharthkp/bundlesize/pull/254
Hi collaborators with push access (30!) π
Please, add a π to the GitHub issue (first thing on top) if you are cool with bundlesize being part of the Chrome Performance Fund
cc train: @SaraVieira @styfle @jagzviruz @destromas1 @montmanu @rahulgandhi @karanjthakkar @ateev @cg-cnu @narendrashetty @reznord @sunilkumarc @yatharthk @vs1682 @chakrihacker @hackerrdave @ankibalyan @samparsky @tohjustin @ForsakenHarmony @hawkins @kuldeepkeshwar @kakadiadarpan @Pancrisp @g3offrey @sreetamdas @kamleshchandnani @palashmon @nitin42 @jkdamilola @haroenv
π
One thing which would make it a lot nicer too is if the comparison would be to the base branch on GitHub (instead of always master
), since that way you get a pure diff
Sometimes you want to compare why something changed, it would be nice to visually diff the two bundles somehow. This could be done by tracking the bundled files in git, but itβs not a nice solution
Support for Github Enterprise with a pluggable way to store stats. The storage solution can be Remote Server or FileSystem
I moved a few projects to https://github.com/GoogleChromeLabs/travis-size-report as I love the way how they report it. The downsize is that it's bound to travis-ci but it works in forks. Very cool that you're picking this up again.
@wardpeet that looks really good!
slight correction, preact
currently doesn't use it anymore, because it didn't work for pull requests from forks π
@ForsakenHarmony removed π
I hope that bundlesize can support GitHub Actions.
updated: in fact, GitHub Actions have been supported.
Wanted to make sure this issue didn't get buried: https://github.com/siddharthkp/bundlesize/issues/202
Hi π,
When are we starting on this roadmap, I would like to contribute.
The Chrome Performance Fund might be able to help with that by paying contributors for their time
I'm happy to share Chrome is donating $10,000 to support bundlesize's 1.0 roadmap π We think this project's goals align well with helping reduce the initial bundle size of modern web experiences.
In particular, we're excited to see the project explore the proposed work on:
- Deeper GitHub integration - easier installation + new checks UX
- Stability through better error handling and removing false negatives
- Easier to integrate with tools like create-react-app and Next.js (esp. stoked about this!)
Great work so far, @siddharthkp and team. Big fans of bundlesize. We hope this helps!
~ signed Addy, @stubbornella and @spanicker
Yes yes yes yes yes :tada:
Is there work to be continued with regards to the roadmap? The repository does not seem to be that active :/
@raunofreiberg
Is there work to be continued with regards to the roadmap?
Yes!
The repository does not seem to be that active :/
No :(
Soon, though. I promise
Any updates on 1.0? Very excited about bundlesize integration with next.js!
@siddharthkp I hope you enjoyed the 10k π
Sigh, I wish I did
Transactions: https://opencollective.com/bundlesize/transactions