Skip to content
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

VSCode completion issues inherent to package.json redirect strategy? #5

Closed
thomasballinger opened this issue Jan 25, 2023 · 2 comments

Comments

@thomasballinger
Copy link

thomasballinger commented Jan 25, 2023

I was having trouble getting import suggestions to show up in VSCode for the Node11 package so don't have a repro here (feel free to close), but in another project following the package-json-redirects strategy I found that I still needed to use something like the types-versions-wildcards approach

"typesVersions": {
  "*": {
    "entrypoint1": "./dist/types/entrypoint
    ...
}

to get reasonable import completion in VSCode.

Without this, I was getting import completions to the types files themselves, things like import {something} from "packagename/dist/something".

If there's something to understand it would be useful to add it to the matrix, is there anything obvious about how VSCode might be confused by package-json-redirects? Again I did not repro this in this repo, so this is likely my mistake — but I wasn't able to rule it out because I didn't get import completion working in the Node11 package.

@thomasballinger thomasballinger changed the title VSCode completion issues VSCode completion issues inherent to a strategy Jan 25, 2023
@thomasballinger thomasballinger changed the title VSCode completion issues inherent to a strategy VSCode completion issues inherent to package.json redirect strategy? Jan 25, 2023
@andrewbranch
Copy link
Owner

Hm, it would take me some time to figure this out, but I wouldn’t be too surprised if this is an inherent limitation, and difficult to fix.

@thomasballinger
Copy link
Author

Cool, if I can get a repro I'll mention it here. My personal experience is now that the combination of these two approaches is ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants