bitcoinjs / bolt11

A library for encoding and decoding lightning network payment requests as defined in BOLT #11.
MIT License
93 stars 65 forks source link

Serve minified version through a CDN #45

Closed krtk6160 closed 3 years ago

krtk6160 commented 3 years ago

We are using the bolt11 library as part of a webservice running on nginx. Due to the atypical nature of our CI/CD pipeline, we have to resort to a rather clunky workaround to run the minification process. It would be great if bolt11 was served from a CDN like cdjns. It would also result in a much better experience for other users who would like to use this library inside the browser.

junderw commented 3 years ago

minified JS is best created on the application layer rather than a la carte via a cdn.

If we hosted bitcoinjs-lib, bolt11, bip32, bip39 etc etc... then a lot of code would be duplicated since all these libraries use a TON of common dependencies. Creating a horrid user experience for your users.

If you only need bolt11, and no other nodeJS packages, then a cdn could work, but you're trusting the person who ran the command immensely.

Much easier and better UX for the end user to run the command yourself and host the minified JS on your own server.

These are the primary reasons why we don't plan on hosting minified JS.

krtk6160 commented 3 years ago

Okay, makes sense. Thanks!