react-router icon indicating copy to clipboard operation
react-router copied to clipboard

QS dependency makes Browserify include Buffer imlementation

Open torarnek opened this issue 12 years ago • 2 comments

Browserify detects that QS uses global Buffer, and includes it in the final bundle. The buffer implementaiton is https://github.com/feross/buffer, and is about 1k lines of code, so we really do not want this in our bundles.

Turning of global detection in Browserify breaks other modules, so that is probably not a working solution.

Would it be possible to replace QS with something else?

torarnek avatar Oct 15 '14 13:10 torarnek

update your deps, I think you're missing this:

https://github.com/hapijs/qs/commit/0814d709c95fa39b25eb522f5a8fbac314c4df38

ryanflorence avatar Oct 15 '14 15:10 ryanflorence

I just ran into this issue - it looks like the npm module of react-router as of today sets qs 2.2.2 as the version to get. After changing react-router's package.json to "qs": "^2" I could browserify react-router without error.

andrewpong avatar Oct 25 '14 01:10 andrewpong