-
Notifications
You must be signed in to change notification settings - Fork 6
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
Feat: Bundle size action #41
Conversation
f800513
to
10007d4
Compare
|
||
1. Replace the frontend build command so on pushes to main the stats.json file is generated by webpack: | ||
|
||
```diff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
which file is this? maybe let's use the one we use in our create-plugin template as example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've updated the readme to mention file paths with the assumption that we're using create-plugin workflows.
…multiple are returned by api
0f14d2f
to
68bdead
Compare
This PR introduces a new action to surface frontend bundle size changes. It relies on the Github actions asset storage to track stats on the default branch. PRs will trigger stats builds and the actions script then compares the changes to asset and module sizes and if the total entrypoint difference is above the minimum threshold the action will post a comment on the PR with a breakdown. Various example comments using this action can be found here.
A standard comment where the size change of entrypoints is greater than the threshold can be seen here.
A similar comment that reduces size of entrypoints can be seen here.
A comment where a PR was previously above the minimum threshold but later falls within it can be seen here. I'm open to the idea of deleting it entirely as well but thought this more informative. 🤷