Skip to content

Commit 82532f9

Browse files
fix(pkg): add types to package.json#exports (#126)
In TS 4.7+, when using newer `moduleResolution` options such as `node16`, `bundler`, and `nodenext`, the types _must_ be defined in `package.json#exports` to be properly detected
1 parent 75ccb72 commit 82532f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"module": "dist/index.mjs",
88
"exports": {
99
"require": "./dist/index.umd.min.js",
10-
"default": "./dist/index.mjs"
10+
"default": "./dist/index.mjs",
11+
"types": "./dist/index.d.ts"
1112
},
1213
"typings": "dist/index.d.ts",
1314
"files": [

0 commit comments

Comments
 (0)