Skip to content

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

@thomasballinger

Description

@thomasballinger

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions