You could get it from npm (or build it) and serve it from your host

Reply to this note

Please Login to reply.

Discussion

I know that's the right way to do it, but I'm poor with NodeJS and npm and struggle getting standalone builds to work

If I have no luck here, then I'll be forced to learn, I suppose

Unpkg is just a cdn for npm packages, so I looked for another one. Here you go:

https://cdn.jsdelivr.net/npm/nostr-tools/lib/nostr.bundle.js

huh, you shouldnt have to do a 'standalone build' just to have a build. npm run build, npm start? or where are you hosting?

There is no build script in the package json of nostr tools. But it’s still simple enough. Clone the repo, install bun, and run:

$ bun run build.js

$ tsc

(You can probably use node instead of bun)

Then the bundle file will be in the lib folder and you can just serve it with the rest of your app

That’s much easier than what I’ve attempted or read

Thanks for sharing! 🙏

Hadn’t heard of “Bun” before

Forgot to tell you to npm install or bun install before running those commands, but that should be all 🙂