From 4f7115f73c33f628edb7922e5883036ecfab9643 Mon Sep 17 00:00:00 2001 From: interfect Date: Tue, 11 Oct 2016 20:27:35 -0700 Subject: [PATCH] Tell browserify to fix up fs.readFileSync calls @substack suggested that this would make browserify able to actually package this module. Without running through brfs, it packages up just fine, but browserify provides an empty `fs` implementation, so when this module goes to load the .proto files on startup it fails. --- package.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index afd5ef95..7e416871 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,9 @@ "url": "https://github.com/ipfs/js-ipfs-bitswap/issues" }, "homepage": "https://github.com/ipfs/js-ipfs-bitswap#readme", + "browserify": { + "transform": [ "brfs" ] + }, "devDependencies": { "aegir": "^8.0.1", "buffer-loader": "0.0.1", @@ -74,4 +77,4 @@ "greenkeeperio-bot ", "npmcdn-to-unpkg-bot " ] -} \ No newline at end of file +}