-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
ESM-only packages come with synthesized default in moduleResolution: bundler
#54752
Comments
In my view this is part of #54102. The whole schtick is we have no idea that CJS and ESM are even different things outside of
|
Also, |
There is something broken here when it comes to how |
Yeah, Iβm sure the default import of a synthesized symbol on a top-level import declaration is special-cased in |
This issue has been marked as "Duplicate" and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
moduleReoslution: bundler
moduleResolution: bundler
This was backed out of 5.5βhoping to reintroduce a fix in 5.6 via #58825. |
Bug Report
π Search Terms
module resolution bundler synthesized default
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
default
export is available here and points to the whole module. I don't think this is right, even withmoduleResolution: bundler
but I can be wrong about this since it's really hard to know what kind of assumptions and goals this mode has when it comes to subtle detailsπ Expected behavior
I don't expect
default
to be available here since this ESM-only package doesn't have a default export.Note that even if this isn't a bug,
.default
available on that dynamically imported binding should behave in the same way in the IDE as the specifier coming from the import statement. Right now the hover info isn't available on it and go to (type?) definition doesn't work on it with cmd+click.cc @andrewbranch
The text was updated successfully, but these errors were encountered: