Skip to content

Commit 0919994

Browse files
authored
fix: imported subpaths types correctly (#569)
* fix: subpaths types added · Modified package.json to add types for every subpath Reference: https://blog.r0b.io/post/esm-nodejs-typescript-with-subpath-exports/ * fix: exported subpaths types correctly used as reference: https://github.com/teppeis/typescript-subpath-exports-workaround
1 parent 94023ea commit 0919994

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,17 @@
3333
"./node": "./lib/node.js",
3434
"./browser": "./lib/browser.js"
3535
},
36-
"types": "lib",
36+
"types": "./lib",
37+
"typesVersions": {
38+
"*": {
39+
"node": [
40+
"lib/node.d.ts"
41+
],
42+
"browser": [
43+
"lib/browser.d.ts"
44+
]
45+
}
46+
},
3747
"files": [
3848
"lib",
3949
"!lib/examples/**/*",

0 commit comments

Comments
 (0)