-
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
Wrong import suggestion in subpath pattern #52870
Comments
Can you please try upgrading your workspace to use the next version of typescript by installing this extension and then restarting VS Code. Does this fix the issue? |
@mjbvz no unfortunately, still the same: |
A reduced repro would let us look at this earlier |
Look like this was fixed in #55015 |
@mbrevda tried with TS 5.4, and still have the same issue in VS Code. Example screenshot: Here you can find the package config: Not sure what is different from WebStorm's approach, but there is works as expected: |
Realizing now that our use cases differ: I'm doing subpath imports. |
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
@neo4j-ndl/react@1.0.0-alpha-fafbc08
<AdjustmentsHorizontalIconSolid />
in a JSX file.The recommended import path is
@neo4j-ndl/react/lib/types/icons
while the correct based on theexports
field would be@neo4j-ndl/react/icons
The modified
package.json
is looking like this:As a library publishers tried it also with WebStorm to see how it behaves and I can see that there it is imported as expected (video):
CleanShot.2023-02-16.at.17.48.07.mp4
Also noticed, that if there is one module imported from
@neo4j-ndl/react/icons
then the suggestion works as expected (image):The text was updated successfully, but these errors were encountered: