How do I load the web3 module into the frontend of my application using the html script element?

I have already installed the web3 module using npm. This is the path to the web3 module in my app directory.


I uploaded the require.js module in the following way using the script element:

script data-main="app" src="node_modules/requirejs/require.js"></script>

What is the correct file path to use when I am attempting to upload the web3 module using the script element and src attribute? I do not know which filepath is the correct one to load.

1 Answer 1


You can use this:

<script src="https://cdn.jsdelivr.net/gh/ethereum/[email protected]/dist/web3.min.js" integrity="sha256-nWBTbvxhJgjslRyuAKJHK+XcZPlCnmIAAMixz6EefVk=" crossorigin="anonymous"></script>

you can search for a more recent version in cnd: https://www.jsdelivr.com/package/npm/web3

Hope this helps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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