Neither of these work:

import { Web3 } from 'https://www.unpkg.com/web3@1.6.1/dist/web3.min.js';

nor this:

import Web3 from 'https://www.unpkg.com/web3@1.6.1/dist/web3.min.js';

I can import other modules this way in the browser no issues.

1 Answer 1


I can do it from esm.sh:

import Web3 from 'https://cdn.esm.sh/v58/web3@1.6.1/es2021/web3.js';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.