VSCode completion issues inherent to package.json redirect strategy?
thomasballinger opened this issue · 2 comments
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.
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.
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.