From 5f2678fb059d643638b9cc1dc59cbfc61ce7a7b8 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 7 Mar 2023 02:07:03 -0500 Subject: [PATCH] Fixed ethers imported in web workers (#3856). --- rollup.config.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rollup.config.js b/rollup.config.js index 1aca3b475c..a740837ab6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -13,11 +13,12 @@ function getConfig(opts) { input: "./lib.esm/index.js", output: { file, + banner: "const __$G = (typeof globalThis !== 'undefined' ? globalThis: typeof window !== 'undefined' ? window: typeof global !== 'undefined' ? global: typeof self !== 'undefined' ? self: {});", name: (opts.name || undefined), format: (opts.format || "esm"), sourcemap: true }, - context: "window", + context: "__$G", treeshake: false, plugins: [ nodeResolve({ exportConditions,