*add polyfill injection to have Buffer and process be global

This commit is contained in:
Derrick Hammer 2022-08-13 04:18:10 -04:00
parent 86d0ca68c0
commit fc41eb645a
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ esbuild.buildSync({
define: { define: {
global: "self", global: "self",
}, },
inject: ["./polyfill.js"],
}); });
esbuild.buildSync({ esbuild.buildSync({

2
polyfill.js Normal file
View File

@ -0,0 +1,2 @@
export const process = require("process");
export const Buffer = require("buffer").Buffer;