Closed aaronadamsCA closed 2 months ago
Oh, this is closest to https://unpkg.com/axios@1.7.3/package.json in case you want to compare. The only difference is the fallback order.
Hi @aaronadamsCA - Thanks for this!
Is there any reason we can't have node as the default? I'd prefer it over having the browser entry there..
Hello @perry-mitchell, unfortunately all runtime cannot run with the node:crypto
, in my case, React Native doesn't support it as is.
At least this change should not be in a minor change.
@perry-mitchell, yeah, it's for the reason @Dallas62 indicates. Since "node"
is currently first, it should remain that way to prevent any new problems.
IMO that part's already correct, too, because "node"
is the exception with "node:crypto"
, while every other runtime uses the Web Crypto API.
Plus this is all just transitional. In 8 months Node.js 18 goes EOL, at which point I'm pretty sure you no longer need a "node"
build at all! Because globalThis.crypto
is stable in Node.js 20. So what you've historically called your "browser"
build really is your default build now, and only Node.js 16-18 need the "node"
build for legacy support.
Any update @perry-mitchell ?
Released under 2.4.1
This should resolve #43.
I also exported your
package.json
as this is very common in large packages. I don't know why, mind you; something to do with bundlers?