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 (#1522)

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)

Reference: https://www.typescriptlang.org/tsconfig/#module
  • Loading branch information
otakustay committed Dec 28, 2021
1 parent 71e34a3 commit 19836d9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -26,7 +26,8 @@
"node": "./build/esm-debug/index.js",
"default": "./build/esm/index.js"
},
"require": "./build/cjs/index.js"
"require": "./build/cjs/index.js",
"types": "./build/esm/index.d.ts"
}
},
"types": "./build/esm/index.d.ts",
Expand Down

0 comments on commit 19836d9

Please sign in to comment.