But seriously, I have added a note to this GitHub issue about how I got it working with ESM. https://github.com/nbd-wtf/nostr-tools/pull/463#issuecomment-2702719855 ..... I'm not by any means an ESM expert, probably we need a Vegan Javascript Expert, under the age of 23, to show up and tell us all how this is supposed to work.

Reply to this note

Please Login to reply.

Discussion

Oh, this is for Nodejs.

I forget that people use Nodejs. That's why everybody always has so much trouble.

The ESM stuff is easy if you're using any bundler for running stuff in the browser.

Assuming you were able to set up the bundler correctly (which is not trivial), it will do the job.