Skip to content

Commit

Permalink
chore: add types to exports field to be compatible with nodenext modu…
Browse files Browse the repository at this point in the history
…le resolution (#4228)

See [1] for detail, in `nodenext` module resolution it requires a
`types` field in `exports` with full filename including extension.

[1]: microsoft/TypeScript#46770 (comment)
  • Loading branch information
otakustay committed Dec 28, 2021
1 parent c196689 commit 51784d0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -27,7 +27,8 @@
"main": "./dist/index.js",
"exports": {
"import": "./wrapper.mjs",
"require": "./dist/index.js"
"require": "./dist/index.js",
"types": "./dist/index.d.ts"
},
"types": "./dist/index.d.ts",
"license": "MIT",
Expand Down

0 comments on commit 51784d0

Please sign in to comment.