Skip to content

Conversation

@roninjin10
Copy link
Contributor

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

@codecov
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
Contributor 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
@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