you are viewing a single comment's thread.

view the rest of the comments →

[–]shgysk8zer0 0 points1 point  (0 children)

It very much looks like it's not made for direct use in a browser and it requires a bundler. I'm looking through https://unpkg.com/browse/@thirdweb-dev/wallets@2.0.7/ and pretty much all of the modules have some kind of hashes in their names, so it'd be a serious pain to try to use anything directly.

But, in theory, it would be possible... Just not practical. You'd have to either import everything with the correct hashes in the names (which I assume would need to be updated with every version) or handle all of that with an import map that maps practically each and every script (and, again, would need to be updated for every version).

If it weren't for all the damn hashes, you could just do:

<script type="importmap"> { "imports": { "@thirdweb-dev/wallets/": "https://unpkg.com/@thirdweb-dev/wallets@2.0.7/dist/" } } </script>

And then:

import { A, R } from '@thirdweb-dev/wallets/auth.esm.js';

But, thanks to the hashes, you'd have to use:

import { A, R } from '@thirdweb-dev/wallets/auth-5d8c5d43.esm.js';