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

Bundle Size Doc Improvements #63

Closed
thilak-rao opened this issue Jun 9, 2020 · 4 comments
Closed

Bundle Size Doc Improvements #63

thilak-rao opened this issue Jun 9, 2020 · 4 comments

Comments

@thilak-rao
Copy link
Contributor

https://getanalytics.io/resources/faq/#how-much-bundle-size-will-this-add

This page should probably mention:

  • If the package is tree-shakeable (looks like it is).
  • I could not find redux as a peer dependency in the source code. Unsure how adding redux will save ~2.6kb)
  • Does the final bundle size of ~11.2kb includes just ESM or both ESM and CJS?
@DavidWells
Copy link
Owner

It looks like a majority of folks are moving away from redux as state management tool 😅

So redux was inlined and shrank via code golf for some savings.

The numbers I look at are from https://bundlephobia.com/result?p=analytics

@thilak-rao
Copy link
Contributor Author

@DavidWells The numbers from bundlephobia is not indicative of real-life bundle bloat as the package includes ESM and CJS build, but in real-life app, you'd use one of the two.

@thilak-rao
Copy link
Contributor Author

Treeshaking should make bundle size even smaller.

@DavidWells
Copy link
Owner

Redux was shrunk and inlined to save a little size.

Closing this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants