chore: add types to exports field to be compatible with nodenext module resolution (#4228)

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

[1]: https://github.com/microsoft/TypeScript/issues/46770#issuecomment-966612103
This commit is contained in:
Gray Zhang
2021-12-28 17:27:08 +08:00
committed by GitHub
parent c196689545
commit 51784d0305

View File

@@ -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",