Skip to content

Commit

Permalink
List types separately in each dist type
Browse files Browse the repository at this point in the history
The uglier more correct work around for TypeScript's strange interaction
with package.json exports in hybrid modules.

Fix: #189
  • Loading branch information
isaacs committed Jan 15, 2023
1 parent 8910265 commit d3fdd61
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,14 @@
"types": "./dist/cjs/index.d.ts",
"exports": {
".": {
"types": "./dist/cjs/index.d.ts",
"import": "./dist/mjs/index.js",
"require": "./dist/cjs/index.js"
"import": {
"default": "./dist/mjs/index.js",
"types": "./dist/mjs/index.d.ts"
},
"require": {
"default": "./dist/cjs/index.js",
"types": "./dist/cjs/index.d.ts"
}
}
},
"files": [
Expand Down

0 comments on commit d3fdd61

Please # to comment.