Trying to build a browser extension that can send transactions to MetaMask for a signature + broadcast, getting a "Failed to execute 'importScripts' on 'WorkerGlobalScope'" error #3969
smilingkylan
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Based on my research, there's no direct way to disable viem's dynamic module loading. This is a fundamental architectural decision in viem to optimize bundle size by loading ABI encoding/decoding modules on-demand.
Here's what I found:
Why This Happens
No Configuration Option
Unfortunately, viem doesn't provide a configuration option to:
I guess my question is whether there is any way around this? You cannot do dynamic imports within a browser extension but I'd still like to simulate the contract. Any advice would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions