[Vuejs]-Iframe – global is not defined

0πŸ‘

I found a workaround.

The SDK I’m using doesn’t work well with Vite. So after looking into CDNs and unpackaging solutions, I saw someone mention importing the udm version of the package. That ended up working, and I removed the polyfill from the project.

I was able to import each like so:

import WalletConnect from "@walletconnect/client/dist/umd/index.min.js";

import QRCodeModal from "@walletconnect/qrcode-modal/dist/umd/index.min.js";

Leave a comment