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

Very large bundle size #91

Open
smithki opened this issue Feb 11, 2020 · 12 comments
Open

Very large bundle size #91

smithki opened this issue Feb 11, 2020 · 12 comments

Comments

@smithki
Copy link

smithki commented Feb 11, 2020

According to Bundlephobia, the bundled package size is quite large (10kb gzipped!)

If only the required APIs from crypto are included, the bundle size reduces to a much more reasonable 1-2kb gzipped. It would be great if the crypto require could be tree-shaken!

@addaleax
Copy link
Collaborator

@smithki PRs are welcome! This module is not very actively maintained otherwise, though.

@panva
Copy link
Contributor

panva commented Feb 16, 2020

Well, it'd be great if the published package didn't include the test folder and dist/object_hash_test.js and other developer flow related files like gulpfile, karma, bower, travis, etc...

Screenshot 2020-02-16 19 04 40

@panva
Copy link
Contributor

panva commented Feb 16, 2020

#92 handles removing the extra clutter. @smithki's concern could also be solved but it would require that the browser bundle is transpiled using something else than deprecated gulp-browserify that doesn't support the destructuring syntax that would (maybe?) make it tree-shaken?

@smithki
Copy link
Author

smithki commented Feb 17, 2020

I’m a big proponent of microbundle. If the project maintainers are not opposed to replacing the build system, it’s a solid option that can solve this issue without any configuration.

@smithki
Copy link
Author

smithki commented Feb 17, 2020

I would be willing to make a PR, but I don’t want to overstep if this is out of scope for the maintainers.

@addaleax
Copy link
Collaborator

@smithki Generally, anything that doesn’t affect consumers of this module should be just fine

@jburghardt
Copy link

Any progress on this?
i could help out , depending on whether @smithki is already working on it.
i dont have time to rework the whole build system, but could implement gulp-rollup, (or something similar?) which would just change how the browser bundle is build.

@smithki
Copy link
Author

smithki commented Mar 30, 2020

@jburghardt -- So sorry, things are busy for me at the moment. I don't think I'll get to this anytime soon. You're welcome to take it on.

@jburghardt
Copy link

Bumping this issue. pull request is pending.

@addaleax
Copy link
Collaborator

PRs are still welcome.

@jburghardt
Copy link

#94

@atomicpages
Copy link

Any interest in an ESM version for tree-shaking support? I'd be happy to send a PR for this 😄

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

5 participants