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

feat: Add bundle visualizer #3463

Merged
merged 4 commits into from
Jun 18, 2024
Merged

feat: Add bundle visualizer #3463

merged 4 commits into from
Jun 18, 2024

Conversation

roninjin10
Copy link
Collaborator

Adds a recomended setup for measuring bundle size.

  • Uses vite because the repo is already using vitest
  • Uses safest option for the most conservative worst case tree shaking
  • Adds a visualizer for visualizing bundle size

Run npm run visualize:bundle to vie a visualization of bundle for evm package

To test a specific import modify the index.ts to only export that import

image

Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.68%. Comparing base (d24ca11) to head (b46b779).
Report is 27 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
blockchain ?
common ?
statemanager ?
trie 59.68% <ø> (?)
util ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Copy link
Contributor

@acolytec3 acolytec3 left a comment

Choose a reason for hiding this comment

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

This is super neat.

@roninjin10
Copy link
Collaborator Author

Btw you can manually play around with tree shaking via changing index.ts to export only what you want to measure and see how big the difference is vs measuring everything

@holgerd77
Copy link
Member

Ok, yeah, that's super great! Will merge!

@holgerd77 holgerd77 merged commit c225537 into master Jun 18, 2024
34 of 36 checks passed
@holgerd77 holgerd77 deleted the visualizer branch June 18, 2024 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants