You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've a little lib that is a wrapper of a REST API, and we use it both in browser and node.
When I build it with browserify, ~90% of the code is Buffer. Can I somehow leave it out of the build, and do the encoding: undefined thing, at least for browser usage?
The text was updated successfully, but these errors were encountered:
I really like nets but had the same problem -- the vast majority of my bundle was just Buffer, which was never even getting used.
If this is intended to be browser-first, it could act a bit more like xhr by defaulting to a string response and using ArrayBuffer instead of Buffer (in both node + browser). But there are some problems that might come from that... maybe it's better to just keep it as a separate module?
Also, there are some alternatives here which might be good (axios and superagent are both small)
I've a little lib that is a wrapper of a REST API, and we use it both in browser and node.
When I build it with browserify, ~90% of the code is Buffer. Can I somehow leave it out of the build, and do the
encoding: undefined
thing, at least for browser usage?The text was updated successfully, but these errors were encountered: