argent-x icon indicating copy to clipboard operation
argent-x copied to clipboard

ArgentX is not working from CDN

Open mohammedi-haroune opened this issue 2 years ago • 0 comments

I want to use ArgentX wallet in a simple web app built with vanilla HTML/CSS/JS with nothing like npm, yarn, webpack, react ....

The first way that come to mind is to use a complied and minified Javascript hosted on some CDN which I did and got the following error in the browser console:

Uncaught ReferenceError: exports is not defined
    <anonymous> https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js:7

Reproduction

Create an HTML file with the following content and open it in the browser, open the console in the developer tools to see the error

<!DOCTYPE html>
<html>

<head>
    <title>Example</title>
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/index.min.js"></script>
</head>

<body>
    <p>This is an example of a simple HTML page with one paragraph.</p>
</body>

</html>

mohammedi-haroune avatar Sep 20 '22 08:09 mohammedi-haroune