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
Minimize the browserified size #89
Comments
Full list of browserified modules: https://gist.github.com/floatdrop/acfb074b261288655e45 Top of size-eaters:
|
👍 I started got-xhr for this reason but haven't published it yet. If possible, I would rather build on an existing module than add more clutter to npm. But with that said, it might be necessary to have a separate
|
Update: I'm now using xhr-request in node/browser for non-streamed requests. For streamed requests, simple-get is pretty good, and half the size of
|
With
|
@floatdrop Woot! Try gzipping too. That gives more accurate numbers. |
Nice! gzip can be misleading when you are considering how bundle size affects parse/execution time. 😄 More details: |
But you should probably include |
p.s. You can't run browserify -r got | uglifyjs -cm | wc -c
Parse error at -:7172,5
Unexpected token: name (redirectCount)
Error
at new JS_Parse_Error (eval at <anonymous> (/Users/matt/npm/lib/node_modules/uglify-js/tools/node.js:22:1), <anonymous>:1526:18)
... |
@mattdesl about Unexpected token: name (redirectCount) it is caused by |
Turns out some people use this with
browserify
, but by defaultgot
is huge when browserified, since it includes thebuffer
browser polyfill and other things. We should look into if there's any way to get it down without too much work.Relevant: https://twitter.com/mattdesl/status/624703076159590400
Not sure, but this might be useful: https://github.com/miguelmota/buffer-to-arraybuffer
The text was updated successfully, but these errors were encountered: