-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
types broken for typescript esm support #76
Comments
What isn’t ESM about those imports? Stuff works in all our ESM projects. Feel free to propose a solution that works for everyone |
@wooorm |
It works fine in TS in ESM, as the build here shows. If it doesn’t for you, perhaps you should report to TypeScript that they should generate |
@wooorm Have you tried with the new nodenext resolution mode for TypeScript? |
The problem is: You are using a non esm moduleResolution mode for TypeScript -> 'node', while it should be -> 'nodenext' for esm. |
To reiterate, feel free to propose a solution that works for everyone. |
Initial checklist
Affected packages and versions
5.3.2
Link to runnable example
No response
Steps to reproduce
The module identifies itself as type=module, yet the corresponding index.d.ts at https://unpkg.com/browse/vfile@5.3.2/lib/index.d.ts on lines 193, 194, 218 and 226 uses non esm compliant imports.
This causes the TypeScript compiler to fail when using new node12 and nodenext moduleResolution modes.
Expected behavior
should work
Actual behavior
does not work
Runtime
No response
Package manager
No response
OS
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: