Skip to content

Commit f1386b7

Browse files
committed
refactor: exports for types and package.json
To ensure that `package.json` is qccessible, it has to be exported. See nodejs/node#33460 For the same reason, we now export TypeScript types.
1 parent 53518ed commit f1386b7

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

package.json

+9-6
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,17 @@
2424
"node": "^14.18.0 || >=16.0.0"
2525
},
2626
"type": "module",
27-
"main": "./dist/index.cjs",
28-
"module": "./dist/index.js",
29-
"es2015": "./dist/index.js",
3027
"types": "./dist/index.d.ts",
28+
"module": "./dist/index.js",
29+
"main": "./dist/index.cjs",
3130
"exports": {
32-
"module": "./dist/index.js",
33-
"require": "./dist/index.cjs",
34-
"default": "./dist/index.js"
31+
"./package.json": "./package.json",
32+
".": {
33+
"types": "./dist/index.d.ts",
34+
"module": "./dist/index.js",
35+
"require": "./dist/index.cjs",
36+
"default": "./dist/index.js"
37+
}
3538
},
3639
"imports": {
3740
"#dev": {

0 commit comments

Comments
 (0)