Skip to content

Commit

Permalink
refactor: exports for types and package.json
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Conaclos committed Jun 10, 2023
1 parent 5cd5128 commit 6164022
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions package.json
Expand Up @@ -29,13 +29,19 @@
"bin": {
"bare": "./dist/cli.js"
},
"types": "./dist/index.d.ts",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
"main": "./dist/index.cjs",
"exports": {
"module": "./dist/index.js",
"require": "./dist/index.cjs",
"default": "./dist/index.js"
"./package.json": "./package.json",
".": {
"require": {
"types": "./dist/index.d.cts",
"default": "./dist/index.cjs"
},
"types": "./dist/index.d.ts",
"module": "./dist/index.js",
"default": "./dist/index.js"
}
},
"sideEffects": false,
"files": [
Expand Down

0 comments on commit 6164022

Please sign in to comment.