Compare commits
No commits in common. "cba2a126ae71c9a5ce5c470cad6f23464e22d675" and "4dd54a4f8bb1f6a88083b2d5178b3948edfd38b8" have entirely different histories.
cba2a126ae
...
4dd54a4f8b
4
build.js
4
build.js
|
@ -3,12 +3,12 @@ import esbuild from "esbuild";
|
||||||
esbuild.buildSync({
|
esbuild.buildSync({
|
||||||
entryPoints: ["src/index.ts"],
|
entryPoints: ["src/index.ts"],
|
||||||
outfile: "dist/index.js",
|
outfile: "dist/index.js",
|
||||||
format: "iife",
|
format: "esm",
|
||||||
bundle: true,
|
bundle: true,
|
||||||
legalComments: "external",
|
legalComments: "external",
|
||||||
// minify: true
|
// minify: true
|
||||||
define: {
|
define: {
|
||||||
global: "self",
|
global: "self",
|
||||||
},
|
},
|
||||||
inject: ["timers.js", "polyfill.js"],
|
inject:['timers.js']
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,7 +27,6 @@
|
||||||
"@libp2p/utils": "^3.0.6",
|
"@libp2p/utils": "^3.0.6",
|
||||||
"@lumeweb/kernel-swarm-client": "git+https://git.lumeweb.com/LumeWeb/kernel-swarm-client.git",
|
"@lumeweb/kernel-swarm-client": "git+https://git.lumeweb.com/LumeWeb/kernel-swarm-client.git",
|
||||||
"@multiformats/mafmt": "^11.1.2",
|
"@multiformats/mafmt": "^11.1.2",
|
||||||
"@peculiar/webcrypto": "git+https://git.lumeweb.com/LumeWeb/webcrypto.git",
|
|
||||||
"b4a": "^1.6.3",
|
"b4a": "^1.6.3",
|
||||||
"blockstore-idb": "^1.1.0",
|
"blockstore-idb": "^1.1.0",
|
||||||
"buffer": "^6.0.3",
|
"buffer": "^6.0.3",
|
||||||
|
@ -73,7 +72,6 @@
|
||||||
"@types/streamx": "^2.9.1",
|
"@types/streamx": "^2.9.1",
|
||||||
"@types/ws": "^8.5.4",
|
"@types/ws": "^8.5.4",
|
||||||
"cli-progress": "^3.12.0",
|
"cli-progress": "^3.12.0",
|
||||||
"crypto-browserify": "^3.12.0",
|
|
||||||
"esbuild": "^0.14.54",
|
"esbuild": "^0.14.54",
|
||||||
"http-browserify": "^1.7.0",
|
"http-browserify": "^1.7.0",
|
||||||
"hyperswarm": "^4.4.0",
|
"hyperswarm": "^4.4.0",
|
||||||
|
@ -100,8 +98,6 @@
|
||||||
"timers": "timers-browserify",
|
"timers": "timers-browserify",
|
||||||
"path": "path-browserify",
|
"path": "path-browserify",
|
||||||
"os": "os-browserify",
|
"os": "os-browserify",
|
||||||
"net": "./src/net.ts",
|
"net": "./src/net.ts"
|
||||||
"crypto": "crypto-browserify",
|
|
||||||
"stream": "stream-browserify"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
13
polyfill.js
13
polyfill.js
|
@ -1,13 +0,0 @@
|
||||||
import { Crypto } from "@peculiar/webcrypto";
|
|
||||||
import { Buffer } from "buffer";
|
|
||||||
|
|
||||||
let globalCrypto = self.crypto;
|
|
||||||
if (!globalCrypto.subtle) {
|
|
||||||
let subtleCrypto = new Crypto().subtle;
|
|
||||||
Object.defineProperty(globalCrypto, "subtle", {
|
|
||||||
get() {
|
|
||||||
return subtleCrypto;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
export { Buffer };
|
|
Loading…
Reference in New Issue