Skip to content

Commit a28eb33

Browse files
committed
Fix ESM compatibility
This allows importing big.js in ESM packages without having to resolve to the import Big from 'big.js/big.mjs'; trick. Fixes GH-170.
1 parent 8655bdf commit a28eb33

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@
1616
"bigint",
1717
"bignum"
1818
],
19+
"exports": {
20+
".": {
21+
"import": "./big.mjs",
22+
"require": "./big.js"
23+
}
24+
},
1925
"repository": {
2026
"type": "git",
2127
"url": "https://github.com/MikeMcl/big.js.git"

0 commit comments

Comments
 (0)