Open kigawas opened 2 weeks ago
Can fix or will fix? Test it first.
the imports are there for a reason. It’s the simplest and most compatible way with huge js ecosystem.
We have rollup, webpack, nodejs, and others tested inside of package ethereum-cryptography
I've tested. It will fix the warning, but it seems kind of redundant
Description
Currently when importing noble-ciphers and noble-hashes on React Native, the following warnings are shown:
It looks like for metro bundler,
import { crypto } from '@noble/ciphers/crypto';
is equivalent toimport { crypto } from '@noble/ciphers/crypto.js';
. Because"./crypto.js"
is not defined in package.json, it falls back to the file-based resolution.Possible fix
Add
"./crypto.js"
in package.json can fix the warnings aboveReference: https://metrobundler.dev/docs/package-exports/