ESM types are wrong
wooorm opened this issue · 2 comments
wooorm commented
Expected Behavior
Be able to use the default normally from ESM.
Actual Behavior
The CJS types are specified for ESM users.
But the CJS types are for CJS, not for ESM.
Steps to Reproduce
Should be possible to reproduce from any ESM file.
Reproducible Demo
syntax-tree/hast-util-to-jsx-runtime@89b9292
Environment
n/a
Keywords
Extra
a) you can drop the root types
field in package.json
b) generate an esm/index.d.mts
c) you can drop the exports.types
fields, they are the defaults for cjs/index.js
-> cjs/index.d.ts
, esm/index.mjs
-> esm/index.d.mts
remarkablemark commented
remarkablemark commented
Release: