Fixed ethers imported in web workers (#3856).
This commit is contained in:
parent
abeaa74da0
commit
5f2678fb05
@ -13,11 +13,12 @@ function getConfig(opts) {
|
|||||||
input: "./lib.esm/index.js",
|
input: "./lib.esm/index.js",
|
||||||
output: {
|
output: {
|
||||||
file,
|
file,
|
||||||
|
banner: "const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !== 'undefined' ? window: typeof global !== 'undefined' ? global: typeof self !== 'undefined' ? self: {});",
|
||||||
name: (opts.name || undefined),
|
name: (opts.name || undefined),
|
||||||
format: (opts.format || "esm"),
|
format: (opts.format || "esm"),
|
||||||
sourcemap: true
|
sourcemap: true
|
||||||
},
|
},
|
||||||
context: "window",
|
context: "__$G",
|
||||||
treeshake: false,
|
treeshake: false,
|
||||||
plugins: [ nodeResolve({
|
plugins: [ nodeResolve({
|
||||||
exportConditions,
|
exportConditions,
|
||||||
|
Loading…
Reference in New Issue
Block a user