Skip to content

Commit

Permalink
fix: add types location for cjs/src/
Browse files Browse the repository at this point in the history
Now we're publishing a `"main"`, TypeScript is using that rather than the
`"exports"` map. It points to the CJS published version, located in cjs/src
in the bundle. This adds a descriptor that tells TypeScript to look for types
for that location in the types/, which should be the same as to what it finds
in the export map.

Ref: #64 (comment)
  • Loading branch information
rvagg committed Mar 8, 2021
1 parent db774dc commit aa031a9
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@
"*": {
"*": [
"types/*"
],
"cjs/src/*": [
"types/*"
]
}
}
Expand Down

0 comments on commit aa031a9

Please sign in to comment.