From 5a3e8d7fb5aceb8ad40afcd09b4bd3a0e722297a Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Wed, 27 Jul 2022 18:46:42 -0400 Subject: [PATCH] *Add browser polyfills --- package.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 03f04c8..61b6c46 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,8 @@ "@lumeweb/dht-web": "https://github.com/LumeWeb/dht-web.git", "hyperswarm": "^4.0.2", "libkmodule": "^0.2.12", - "libskynet": "^0.0.62" + "libskynet": "^0.0.62", + "randombytes": "https://github.com/LumeWeb/randombytes-browser.git" }, "devDependencies": { "@rollup/plugin-commonjs": "^22.0.1", @@ -25,6 +26,7 @@ "@types/jest": "^28.1.3", "@types/read": "^0.0.29", "buffer": "^6.0.3", + "crypto-browserify": "^3.12.0", "esbuild": "^0.14.48", "inspectpack": "^4.7.1", "jest": "^28.1.1", @@ -36,12 +38,15 @@ "read": "^1.0.7", "rollup": "^2.75.7", "rollup-plugin-polyfill-node": "^0.9.0", + "stream-browserify": "^3.0.0", "ts-loader": "^9.3.1", "typescript": "^4.7.4", "webpack": "^5.73.0", "webpack-cli": "^4.10.0" }, "browser": { - "sodium-universal": "@screamingvoid/sodium-universal" + "sodium-universal": "@screamingvoid/sodium-universal", + "crypto": "crypto-browserify", + "stream": "stream-browserify" } }