Skip to content

Commit

Permalink
fix: allow consuming TS project to find types
Browse files Browse the repository at this point in the history
For some reason the exports field is not working at least on Prisma PDP codebase.
  • Loading branch information
jasonkuhrt committed Sep 8, 2022
1 parent 408eb22 commit fb253fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"packageManager": "pnpm@7.11.0",
"license": "MIT",
"type": "module",
"types": "./dist/esm/index.d.ts",
"files": [
"src",
"dist"
Expand Down

1 comment on commit fb253fe

@jasonkuhrt
Copy link
Owner Author

@jasonkuhrt jasonkuhrt commented on fb253fe Sep 8, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah this was indeed a bug for older setups of TS as described here:

Given that package.json exports are currently only supported in node16/nodenext, if your temp-ts-playground is not using one of those, that’s why nothing you try is working. If you are using one of those modes, I can’t quite tell what’s going on from the screenshots, but I would highly recommend tsc --traceResolution as a debugging tool.

microsoft/TypeScript#33079 (comment)

Please sign in to comment.