From 9c1b8d2d226c0111d86896fa4813ad72000e10d3 Mon Sep 17 00:00:00 2001 From: RangerMauve Date: Thu, 8 Aug 2019 15:02:49 -0400 Subject: [PATCH] Add dirty hack to make browserify work --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index f32e61d..2ef60a0 100644 --- a/index.js +++ b/index.js @@ -1,10 +1,14 @@ +const path = require('path') + +// This is a dirty hack for browserify to work. 😅 +if(!path.posix) path.posix = path + const discovery = require('hyperdiscovery') const datStorage = require('universal-dat-storage') const DatEncoding = require('dat-encoding') const crypto = require('hypercore-crypto') const RAM = require('random-access-memory') const fs = require('fs') -const path = require('path') const datDNS = require('dat-dns') const hyperdrive = require('hyperdrive')