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

Import completion in VSCode #4

Open
thomasballinger opened this issue Jan 25, 2023 · 3 comments
Open

Import completion in VSCode #4

thomasballinger opened this issue Jan 25, 2023 · 3 comments

Comments

@thomasballinger
Copy link

After implementing the package-json-redirects strategy in a larger project I found VSCode import suggestions were having suggesting the wrong files. This repository seemed like a great way to test with a small example, but I haven't been able to complete one or two and see suggested imports any of the three packages from the node-11-resolution or node-16-resolution projects.

Do you happen to know what I might be doing wrong, or why these projects don't complete for me?

@andrewbranch
Copy link
Owner

You’ll need to open the directory that actually contains the tsconfig.json file, not the repo root, in order for VS Code to pick it up.

@thomasballinger
Copy link
Author

Hm I've been doing that, having trouble triggering it. Will report back if I figure this out.

@thomasballinger
Copy link
Author

I didn't get this working for node11, but with node16 I had better luck when I tried installed this library manually:

cd examples/node16-resolution
npm install ../node_modules/package-json-redirects
code .

then opening main.mts, deleting imports, and typing one brings up something that looks good!
image

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