-
-
Notifications
You must be signed in to change notification settings - Fork 868
Closed
Description
https://github.com/hapijs/qs/blob/master/lib/utils.js#L134 contains a call to Buffer.isBuffer. This means that when qs@2.x is browserified (we're still on 0.6 for the client side...), the whole Buffer module is pulled in - which adds an extra 40kb (~20kb minified) of code in the bundle - and all of it for just this one function, which is only used once.
I'll try to see if there's a workaround on the browserify side of things, but the question still stands...
The workaround in browserify is to create a fake file which exports Buffer.isBuffer = () => false and expose that as "buffer". It would still be nice to not have to use this workaround...
Reactions are currently unavailable