-
-
Notifications
You must be signed in to change notification settings - Fork 209
Project References support #2148
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
Comments
paths
imports with TypeScript's Project References
Some updates. I am making this the mega thread for project reference support since we didn't support it at all. Leaving some notes here as an update on the progress and also as a reminder in case I forgot about it, which I often do 😅. The problem with this one is that project reference is used to load different tsconfig that doesn't use the name "tsconfig.json". Vite templates also often use this to differentiate server files and web files. So module resolution needs to use the redirected tsconfig. #2262 has another problem with the "Build-Free Editing with Project References". Repro: https://github.com/mamidenn/module-resolution-repro. The problem with this one is the packages.json exports point to non-existent .dts files. And with the project reference, it should be redirected to the corresponding source file in the source project. typescript uses internal API to expose a "compilerHost", from the language service program to the module loader. There is handling in it to redirect the dist .dts to the source file. For general project reference. There is also a problem with the caching of the parsed tsconfig. We need to implement the |
Describe the bug
I'm using TypeScript's Project References and it's looks like Svelte extension didn't work with it.
Extension output:
Reproduction
Clone https://github.com/ziggi/svelte-ts-projects
Open it in VS Code and open
svelte-ts-projects\proj1\svelte\TestComponent.svelte
file.You will see
Cannot find module '@shared/SharedTest' or its corresponding type declarations.
Expected behaviour
It should just work.
System Info
Svelte for VS Code v107.10.0
Version: 1.78.2 (user setup)
Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435
Date: 2023-05-10T14:39:26.248Z
Electron: 22.5.2
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.22621
Sandboxed: No
Which package is the issue about?
Svelte for VS Code extension
Additional Information, eg. Screenshots
The text was updated successfully, but these errors were encountered: