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

[BUILD TOOLS]: Replace Bundlesize #1764

Closed
markwhitfeld opened this issue Jun 18, 2021 · 8 comments · Fixed by #1865
Closed

[BUILD TOOLS]: Replace Bundlesize #1764

markwhitfeld opened this issue Jun 18, 2021 · 8 comments · Fixed by #1865

Comments

@markwhitfeld
Copy link
Member

markwhitfeld commented Jun 18, 2021

Description

Bundlesize has issues comparing PR bundle sizes to master.
Updating the bundlesize manually in PRs is a real pain, and it doesn't give a comparison to master (because of issue siddharthkp/bundlesize#308). There must be something better!
We are probably also abusing the maxSize threshold prop by keeping it so close to the actual size and updating it all the time.

We need to investigate alternatives!

Some thoughts:

  • It would be nice to commit the actual sizes to keep a history
  • We really need to be able to compare a PR to master to see the change in size
  • It should not interfere with PRs so much, the check and comparison is important, but fiddling values all the time is tedious
  • It would be great if there was some easier way to automate the bundle size commits in PRs (potentially a commit from CI - although we would not want this to be recursive!)

We really need 2 different things...

  • Report the size difference to master from a PR
  • Commit a list of the current bundle sizes so that we can have a history
    Maybe these could come from different tools
@markwhitfeld
Copy link
Member Author

markwhitfeld commented Jun 18, 2021

This might be an easy drop-in replacement:
https://bundlewatch.io/#/getting-started/using-bundlewatch
I think it is a fork of the other project

Bundlewatch has an action too
https://github.com/jackyef/bundlewatch-gh-action

We could use something like this to push updates back to the PR... as long as we have a way to save or retrieve the bundle sizes as a json file. I think that we could use one of the internal bundlesize apis to fetch the file details (https://github.com/bundlewatch/bundlewatch/blob/98b7b789d40032b301351d2c0b02a1c443db2b7a/src/app/reporting/BundleWatchService/index.js#L40)
https://github.com/marketplace/actions/git-auto-commit

@markwhitfeld
Copy link
Member Author

@splincode splincode pinned this issue Jun 18, 2021
@markwhitfeld markwhitfeld unpinned this issue Jun 24, 2021
@markwhitfeld
Copy link
Member Author

@splincode This looks like a great alternative that was released recently:
https://github.com/LironEr/bundlemon

@splincode
Copy link
Member

@markwhitfeld it's really interesting! what about add github action?
https://github.com/LironEr/bundlemon-github-actions

@markwhitfeld
Copy link
Member Author

@splincode Yeah, it looks like great integration!

@arturovt
Copy link
Member

@rfprod since you’re a pro at GitHub actions, would you want to take this one also?

@rfprod
Copy link
Contributor

rfprod commented Jun 17, 2022

@arturovt @markwhitfeld
I have a question. Do you think it will be possible to contribute to the project via the fork strategy if bumdlemon is used with all possible features instead of bumdlesize?
In particular if GH app will be ebabled https://github.com/LironEr/bundlemon-github-actions#create-bundlemon-project?
Forkes will not have environment variables.

PS:
Or bundlemon jobs can be disabled in forks just as publish jobs.

@rfprod
Copy link
Contributor

rfprod commented Jun 17, 2022

@arturovt Yes, I can take this one, but most likely it will require collaboration in terms of creating a bundlemon project and adding secrets to the repo.

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

Successfully merging a pull request may close this issue.

4 participants