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

Restart TS Server when tsconfig is changed in a monorepo #187208

Open
kentcdodds opened this issue Jul 6, 2023 · 3 comments
Open

Restart TS Server when tsconfig is changed in a monorepo #187208

kentcdodds opened this issue Jul 6, 2023 · 3 comments
Assignees
Labels
feature-request Request for new features or functionality typescript Typescript support issues
Milestone

Comments

@kentcdodds
Copy link

I'm looking for this functionality to be built in: https://marketplace.visualstudio.com/items?itemName=neotan.vscode-auto-restart-typescript-eslint-servers

My use case is difficult to describe so I recorded a loom: https://www.loom.com/share/53cf1148a0f54902a77a538f9de683d6

Here's a summary of the loom:

Hey there! In this Loom, I discuss a peculiar use case that I encounter during my workshops. Each step in the workshop is a separate app nested within the entire repository. However, we face a challenge with multiple copies of the same app with slight changes, making it difficult to navigate and find specific files. To overcome this, I found a solution of opening another instance of VS code in the playground, which allows for easy file search and navigation. But, there's a catch! When I copy files into the playground, it overrides existing files, causing the TS server to become unhappy. I'm seeking suggestions to avoid this annoyance and improve the overall workshop experience. Any ideas? Let's dive in!

Here's the workshop repo: https://github.com/epicweb-dev/full-stack-foundations

Here's the repo responsible for the app we're using: https://github.com/epicweb-dev/kcdshop

Let me know if you have any other questions.

@mjbvz mjbvz added feature-request Request for new features or functionality typescript Typescript support issues labels Jul 19, 2023
@VSCodeTriageBot VSCodeTriageBot added this to the Backlog Candidates milestone Jul 19, 2023
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@VSCodeTriageBot
Copy link
Collaborator

🙂 This feature request received a sufficient number of community upvotes and we moved it to our backlog. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@ctsstc
Copy link

ctsstc commented Aug 1, 2023

I run into the same issue whenever we rebuild one of our submodules, the TS Language Server needs to be restarted otherwise I run into broken imports to the submodule such as:

Cannot find module 'some-module-name-here' or its corresponding type declarations.

Given that we rebuild during our commit/integration process, and we do micro-commits; this is something I have to do multiple times throughout the day.

Thank you @kentcdodds for the stop-gap fix for now via an extension.
Edit: It doesn't seem to work for my scenario, I did try to override some of the configuration to watch for my submodules directory changing
Edit2: I found the right combination, it seems to restart on the file deletion and creation during the build process. It could also be nice if it could debounce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

4 participants