From 38999b3b10dbff20e573b291cbf5eba925229832 Mon Sep 17 00:00:00 2001 From: 0xshippor <14165372+0xshippor@users.noreply.github.com> Date: Mon, 8 May 2023 14:55:47 +0200 Subject: [PATCH 1/2] Fix CJS browser bundling --- lib.commonjs/package.json | 9 +++++++++ misc/basedirs/lib.commonjs/package.json | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/lib.commonjs/package.json b/lib.commonjs/package.json index 5bbefffbab..0e2116858b 100644 --- a/lib.commonjs/package.json +++ b/lib.commonjs/package.json @@ -1,3 +1,12 @@ { + "browser": { + "./crypto/crypto.js": "./crypto/crypto-browser.js", + "./providers/provider-ipcsocket.js": "./providers/provider-ipcsocket-browser.js", + "./providers/ws.js": "./providers/ws-browser.js", + "./utils/base64.js": "./utils/base64-browser.js", + "./utils/geturl.js": "./utils/geturl-browser.js", + "./wordlists/wordlists.js": "./wordlists/wordlists-browser.js" + }, + "sideEffects": false, "type": "commonjs" } diff --git a/misc/basedirs/lib.commonjs/package.json b/misc/basedirs/lib.commonjs/package.json index 5bbefffbab..0e2116858b 100644 --- a/misc/basedirs/lib.commonjs/package.json +++ b/misc/basedirs/lib.commonjs/package.json @@ -1,3 +1,12 @@ { + "browser": { + "./crypto/crypto.js": "./crypto/crypto-browser.js", + "./providers/provider-ipcsocket.js": "./providers/provider-ipcsocket-browser.js", + "./providers/ws.js": "./providers/ws-browser.js", + "./utils/base64.js": "./utils/base64-browser.js", + "./utils/geturl.js": "./utils/geturl-browser.js", + "./wordlists/wordlists.js": "./wordlists/wordlists-browser.js" + }, + "sideEffects": false, "type": "commonjs" } From 89bbcd5e0f18bf74e1436fa1f7747f3a9f6790f5 Mon Sep 17 00:00:00 2001 From: 0xshippor <14165372+0xshippor@users.noreply.github.com> Date: Mon, 8 May 2023 15:21:01 +0200 Subject: [PATCH 2/2] remove package.json edits from build files --- lib.commonjs/package.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lib.commonjs/package.json b/lib.commonjs/package.json index 0e2116858b..5bbefffbab 100644 --- a/lib.commonjs/package.json +++ b/lib.commonjs/package.json @@ -1,12 +1,3 @@ { - "browser": { - "./crypto/crypto.js": "./crypto/crypto-browser.js", - "./providers/provider-ipcsocket.js": "./providers/provider-ipcsocket-browser.js", - "./providers/ws.js": "./providers/ws-browser.js", - "./utils/base64.js": "./utils/base64-browser.js", - "./utils/geturl.js": "./utils/geturl-browser.js", - "./wordlists/wordlists.js": "./wordlists/wordlists-browser.js" - }, - "sideEffects": false, "type": "commonjs" }