Skip to content

Commit 0ab7aa9

Browse files
committed
add exports field to package.json
ESM projects can now import the tree-shakeable ESM code. Node.js doesn't use the "module" field.
1 parent 6f5d6f5 commit 0ab7aa9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
"name": "hash-wasm",
33
"version": "4.12.0",
44
"description": "Lightning fast hash functions for browsers and Node.js using hand-tuned WebAssembly binaries (MD4, MD5, SHA-1, SHA-2, SHA-3, Keccak, BLAKE2, BLAKE3, PBKDF2, Argon2, bcrypt, scrypt, Adler-32, CRC32, CRC32C, RIPEMD-160, HMAC, xxHash, SM3, Whirlpool)",
5-
"main": "dist/index.cjs",
6-
"module": "dist/index.mjs",
5+
"exports": {
6+
"require": "dist/index.cjs",
7+
"default": "dist/index.mjs"
8+
},
79
"types": "dist/lib/index.d.ts",
810
"scripts": {
911
"build": "sh -c ./scripts/build.sh",

0 commit comments

Comments
 (0)