svelte-web3
svelte-web3 copied to clipboard
Unable to use Web3Modal & WalletConnect on Sveltekit
Hey, I'm trying to see the Modal in Sveltekit and I get a blank modal (maybe because providers aren't loaded?)
So I try to add WalletConnect but it throws an error that globals aren't defined.
So I tried const WalletConnectProvider = await import("@walletconnect/web3-provider");
But after that the error just moves to index.ts:19 instead of the main scope
Edit: It happens with all the external wallets
I'm not sure this is really related to svelte-web3. Could you commit a small test case that reproduce this somewhere ?
I've experienced problems with walletconnectprovider/web-3
as well and it seems to be an issue with vite
, here are a handful of open tickets: https://github.com/WalletConnect/walletconnect-monorepo/issues/864 and https://github.com/WalletConnect/walletconnect-monorepo/issues/341
I tried the workaround suggested in the last comment on issue 341 about importing the umd
dist file, which seems to work for now.