Closed cmdruid closed 1 year ago
You should report this to unpkg. I am not familiar with their build system, it could be their error.
We support deno, webpack, browserify, rollup, standalone file, etc -- hard to ensure everything works properly.
unpkg.com is run by npmjs.com and is their automated CDN service.
NPM supports a "unpkg"
keyword in package.json
to point towards a browser-compatible build. It tells NPM specifically which file in your package to make available on their unpkg CDN.
I think something like "unpkg": "lib/index.js"
would work as an example. If you have any questions about it, please let me know!
I do not mean to make a big deal out of it, just I would like to import using unpkg.com/@noble/libsecp256k1
versus github.com/paulmillr/noble-secp256k1/releases/download/1.7.0/noble-secp256k1.js
(also not deal with CORS issues from github imports). Thank you for responding!
I can change package.json, but did you actually test the change? I don't want to do a broken release
I did a test deployment and submitted a PR. No need to merge, just demonstrating the minor changes to get it working with NPM's unpkg CDN. See here:
v2.0 will be unpkg-friendly
Hello. I am getting this error when trying to import the library into the browser, from the following URL:
https://unpkg.com/@noble/secp256k1@1.7.0
I do not get this problem when I import the file from the github releases page, or locally from my machine.
I think there may be a mis-configuration somewhere (package.json?), as unpkg.com is not properly hosting a browser version of the file , even though it seems to work fine when I import the file from other sources.
This is not a critical issue. I thought to bring it up since unpkg.com is useful as a CDN, and it would be nice to pull a working version from there.