Using Web3Auth in WeWeb

I need to create a Web3 application with WeWeb (https://www.weweb.io/). WeWeb allows to create custom elements and sections based on Vue. It allows to also add Npm packages but does not allow to edit webpack.config.js. package.json is the only file I have access to. WeWeb has no config override files.

Is there any way to make Web3Auth work without access to webpack.config.js? Somehow dynamically load at runtime?

I was thinking perhaps using an ESM version and straight up importing the libraries into the page as a workaround? But the ESM libraries seem to be buggy. This html results in an error:


<html>
  <head>
    <script type="module">
       import web3authmodal from 'https://cdn.jsdelivr.net/npm/@web3auth/modal@8.8.0/+esm';
    </script>
  </head>
  <body>
     test
  </body>
</html>

Uncaught SyntaxError: The requested module '/npm/loglevel@1.9.1/+esm' does not provide an export named 'levels' (at +esm:7:124)

the invalid line is this:

import n, {levels as o} from "/npm/loglevel@1.9.1/+esm";

Hey @silver sorry for the delays, one of our team member is already looking into the issue. We’ll get back to you soon.

Hey @silver
I’ll advise you to try out the umd version.

<script src="https://cdn.jsdelivr.net/npm/@web3auth/modal@8.10.1/dist/modal.umd.min.js" integrity="sha256-pRt465ADsItktZS69I5YPh+rZ6cbSsva4GZ2BlLIbAM=" crossorigin="anonymous"></script>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.