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

[NO-TICKET] Adds optional bundle analysis to the build command #3258

Merged
merged 3 commits into from
Oct 4, 2024

Conversation

pwolfert
Copy link
Contributor

@pwolfert pwolfert commented Oct 2, 2024

Summary

  • Adds optional bundle analysis to the build command like yarn build:core --analyze-bundles

How to test

yarn build:core --analyze-bundles and open the html files it generates

@pwolfert pwolfert added Type: Internal This item relates to internal tooling/maintenance Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. labels Oct 2, 2024
@pwolfert pwolfert added this to the 12.0.0-beta.0 milestone Oct 2, 2024
@jack-ryan-nava-pbc
Copy link
Collaborator

Works like a charm. I haven't looked too deeply into this package, but is it possible for it to give us a size other than the stat/pre-tree shaken size of the packages? All the parse and gzip values report 0kb, which seems incorrect?

@pwolfert
Copy link
Contributor Author

pwolfert commented Oct 2, 2024

There's a defaultSizes option, and I wondered if changing it to gzip would force it to collect that data, but it didn't work. I'm not sure why that data is missing.

@pwolfert
Copy link
Contributor Author

pwolfert commented Oct 2, 2024

Oh, there's this troubleshooting note

Copy link
Collaborator

@kim-cmsds kim-cmsds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works locally with the various child design system packages! And let's go with --analyze-bundles.

@pwolfert
Copy link
Contributor Author

pwolfert commented Oct 2, 2024

Can't figure out why it doesn't report on other stats, but it could be an enhancement in the future

@pwolfert pwolfert merged commit 624143b into main Oct 4, 2024
1 check passed
@pwolfert pwolfert deleted the pwolfert/bundle-analysis branch October 4, 2024 19:57
@kim-cmsds kim-cmsds modified the milestones: 12.0.0-beta.0, 11.1.0 Oct 9, 2024
kim-cmsds pushed a commit that referenced this pull request Oct 17, 2024
* Add optional bundle analysis to our builds with `yarn build:core --analyze`

* Change flag name to `--analyze-bundles`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Impacts: Core Impacts the core DS primarily, changes may occur in other themes as well. Type: Internal This item relates to internal tooling/maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants