-
-
Notifications
You must be signed in to change notification settings - Fork 209
Module resolution issue with project reference #2673
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
This has been proposed in TypeScript before but was rejected(microsoft/vscode#12463, microsoft/TypeScript#11224). While the tsconfig searching in svelte-language-server is currently not entirely controlled by TypeScript, it is better to stay consistent with TypeScript as It'll introduce inconsistencies between js/ts files and svelte files. Can you share why you can't use tsconfig.json? Alternatively, you can create multiple tsconfig in different directories with different |
I’m encountering issues with TypeScript imports when using project references. If I remove the project references, everything works correctly. Here's a minimal reproducible example: https://github.com/jsbravoc/min-repo-svelte-ts In this setup, there are two TSConfigs:
In CI, I'm using the second TSConfig, and I’d like the VSCode extension to use it as well. Edit: I want to keep the TSConfig with project references because I'm using Nx with the TypeScript plugin. This plugin automatically updates all TSConfig files in the monorepo and sets project references based on package dependencies https://nx.dev/nx-api/js/generators/typescript-sync |
The import issue is a bug so I'll fix it instead. |
…2676) #2673 Fixing the actual problem that makes the OP want this option. The problem is that the referenced project is a common js project which allows extensionless import. But when we used the wrong compiler option to check for the resolution mode. TypeScript thus used the ESM strategy to resolve the import.
Description
svelte-check
with a custom --tsconfig path. However, the VSCode extension uses the default one (tsconfig.json)Proposed solution
Add an extension configuration to set the tsconfig path.
Alternatives
No response
Additional Information, eg. Screenshots
No response
The text was updated successfully, but these errors were encountered: