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

Set "preserveSymlinks" to true in tsconfig.json to support VSCode autocomplete when using PNPM #4605

Closed
4 tasks done
Maikuh opened this issue Aug 14, 2021 · 6 comments
Closed
4 tasks done
Labels

Comments

@Maikuh
Copy link

Maikuh commented Aug 14, 2021

Clear and concise description of the problem

As a developer using Vite, I want to have VSCode's auto import/complete features working correctly when using pnpm as the package manager, so that I can improve the development experience.

Suggested solution

Set preserveSymlinks option to true by default in the tsconfig.json file when scaffolding a new project.

Alternative

No response

Additional context

For more context, see the issue I created in pnpm's repository.

Validations

@pot-code
Copy link

pot-code commented Aug 28, 2021

It's not the silver bullet apparently, even I have set the preserveSymlinks to true, some variables' types are still not recognized, like the css prop from the @emotion/react in my case.

@Maikuh
Copy link
Author

Maikuh commented Sep 18, 2021

@pot-code can you try reloading the window (e.g. Ctrl + Shift + P > Developer: Reload Window) or restarting the Typescript server (e.g. Ctrl + Shift + P > TypeScript: Restart TS Server)? It seems to be working fine for me, see the picture below:

image

@pot-code
Copy link

@Maikuh thanks, I'll try later

@bluwy
Copy link
Member

bluwy commented Jun 25, 2022

Is this required? I'm using pnpm without the config and I don't have any issues with Intellisense

@bluwy bluwy added the cannot reproduce The bug cannot be reproduced label Jun 25, 2022
@pot-code
Copy link

Is this required? I'm using pnpm without the config and I don't have any issues with Intellisense

No, it works excellent now😇

@Maikuh
Copy link
Author

Maikuh commented Jun 25, 2022

Closing as it seems this was fixed some other way.

@Maikuh Maikuh closed this as completed Jun 25, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants