Skip to content

Commit

Permalink
build: support modern node resolution (#172)
Browse files Browse the repository at this point in the history
If tsconfig's moduleResolution is set to Node16 or NodeNext it stops
using the "types" property in package.json and, instead, relies on
"types" inside "exports".

This now supports both.
  • Loading branch information
ojeytonwilliams authored Apr 25, 2024
1 parent bcf7b00 commit 7bbc52a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
],
"exports": {
".": {
"types": "./dist/index.d.ts",
"require": "./dist/index.cjs",
"default": "./dist/index.mjs"
}
Expand Down

0 comments on commit 7bbc52a

Please sign in to comment.