Skip to content

Commit aacacf1

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 c4c4194 commit aacacf1

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

package.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,19 @@
2929
"bin": {
3030
"bare": "./dist/cli.js"
3131
},
32-
"types": "./dist/index.d.ts",
33-
"main": "./dist/index.cjs",
3432
"module": "./dist/index.js",
33+
"main": "./dist/index.cjs",
3534
"exports": {
36-
"module": "./dist/index.js",
37-
"require": "./dist/index.cjs",
38-
"default": "./dist/index.js"
35+
"./package.json": "./package.json",
36+
".": {
37+
"require": {
38+
"types": "./dist/index.d.cts",
39+
"default": "./dist/index.cjs"
40+
},
41+
"types": "./dist/index.d.ts",
42+
"module": "./dist/index.js",
43+
"default": "./dist/index.js"
44+
}
3945
},
4046
"sideEffects": false,
4147
"files": [

0 commit comments

Comments
 (0)