-
-
Notifications
You must be signed in to change notification settings - Fork 600
Bug: type issue in [email protected]+ with esm #1348
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
Comments
I belived this issue is releated to microsoft/TypeScript#50690 Adding |
Thanks for opening an issue. Citing the issue template:
We cannot make this any clearer. Please add a reproduction and we'll be happy to triage further. |
Uh oh!
There was an error while loading. Please reload this page.
A lot of plugins are exporting esm version
In a recent change in ts4.8, this leaves to type failue. as [email protected]+ will assume users are importing a commonjs module.
Here is a example:
TS will report issues with:
Saying the expression is not callable.
That's because a cjs module will have it's module.exports on
default
key, so:is fine to typescript, but it's not acually working (because we do have esm modules using
export default
)This happens under
type: module
in pacakge.json) and of coursetarget: ESxxx
in ts.config.jsonmoduleResolution: NodeNext
is in ts.config.jsonThe text was updated successfully, but these errors were encountered: