-
Notifications
You must be signed in to change notification settings - Fork 21
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 module size analysis #155
Conversation
Bundle StatsHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed
Bigger
Smaller
Unchanged No assets were unchanged |
Bundle Stats-Flipped aroundHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded
Removed No assets were removed Bigger
Smaller
Unchanged No assets were unchanged |
Bundle Stats-Non existantHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged No assets were unchanged |
Bundle Stats-No changesHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
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.
Looks great to me.
Doesn't have to be this PR, but what do you think of adding indicator icons to the table to make it more scannable? Something like 🔴 for increase, 🟢 for decrease? Or alternatively 📈 / 📉 .
One question re the changset here - do we want to account for things like "which bundles are these in" A single webpack stats.json might have multiple output files (which are the things this action compares currently). Single files in a bundle might exist in multiple bundles. Should we link back to the files these items are bundled in somehow to display this? |
I love it! I had the same thought, but I think we can do that in a follow-up PR and experiment with some different indicators. |
Should we add an additional 'workflow' that outputs something with a changeset that displays on every PR? |
Great point! Currently the modules are flattened out to just a single list, but we are accessing them via Chunk 1 (table of files) Chunk 2 (table of files) Or alternatively, show the chunk each file belongs to: Changeset
Good call, I'll update the workflows. |
Bundle Stats-With chunk and module informationHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
Changeset
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged
|
Bundle Stats-Non existentHey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle. As this PR is updated, I'll keep you updated on how the bundle size is impacted. Total
View detailed bundle breakdownAdded No assets were added Removed No assets were removed Bigger No assets were bigger Smaller No assets were smaller Unchanged No assets were unchanged |
@mattcosta7 I added another workflow with changeset information. Regarding handling multiple chunks, I think we can handle this whenever we start splitting up more files by route and such, but for now it's not a common usecase, so it could just be a follow-up later. |
This PR adds a more detailed bundle size analysis than just the aggregate asset size, which includes only files that were changed (i.e., added, removed, made larger, or made smaller).
The changeset table is sorted from largest diff percentage to smallest diff percentage, so that large bundle size increases (in relative terms) are highlighted first. The newly added stats files were derived from a much larger
stats.json
file which reflects real-world usage. The new changeset table will only be generated ifchunks
information is available. Otherwise, it will not be shown.The following is an example of what the Bundle Stats comment looks like now:
Bundle Stats
Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.
As this PR is updated, I'll keep you updated on how the bundle size is impacted.
Total
Changeset
View detailed bundle breakdown
Added
No assets were added
Removed
No assets were removed
Bigger
No assets were bigger
Smaller
No assets were smaller
Unchanged