-
Notifications
You must be signed in to change notification settings - Fork 74
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
composite: true
shows error in vscode after upgrading to version 5
#222
Comments
Seems the issue is related to How can we use |
composite: true
shows error in vscode after upgrading to version 5
Also experiencing this exact issue. What's even stranger... Whenever I make a small inconsequential edit to any project's Whenever I trigger a TS language server restart in vscode, the issue reappears. When I open a project directly with vscode, instead of the whole monorepo, this issue does not occur at all. Using vscode 1.77.3, typescript 5.0.4, typescript-plugin-css-modules 5.0.1. |
same here |
In TypeScript v5, a number of APIs were deprecated and we had to move to a new API. I don't have any composite projects to test against, but if someone can create a reproduction, I'd be happy to take a look and try to solve this :) |
@mrmckeb Thanks for your reply. Actually, for any typescript project with And I created this repo to show the issue: https://github.com/leozhao0709/typescript-plugin-css-modules-test. Thanks again for all your help. |
I was running into the same issue with JSON files. As per this comment in #33827, I was able to fix the problem by adding the following to my "include": ["**/*", "**/*.json"] So the same may work for |
I've tried it with my WIP Monorepo and it's not working. |
Hi all, I tried again to solve this today using @leozhao0709's repo, and still saw the issue that @Delevin888 shared in their screenshot.
I saw the same thing in my test project when I enabled When searching the TypeScript repo, I found the below issue. Adding CC @jakebailey who may have some insights here, but as this is an error from TypeScript - and not the plugin - I'm not sure what to do here. |
I don't have any immediate guesses, and would probably have to do a bunch of debugging to figure out what's happening. I likely won't have time to look at this myself for a few weeks. Maybe @sheetalkamat has a guess. I will say that from re-skimming this project, I believe this plugin works by effectively "lying" to TypeScript about the css files and telling it that they are actually TS files. These days, TypeScript supports arbitrary file extensions, such that a Even neater would be to have a tool that can be run that dumps those faked d.css.ts files to disk, such that regular |
Thanks @jakebailey! Yes, you're correct - it's all trickery today which is why some features are quite hard to implement.
Do you have an example of supplying something like a
There are a few projects that do this, but people turn to projects like this because they don't like the "noise" in their projects. The generated files make it harder to skim file trees, and then you need a process that generates those locally and in CI or things break. |
I don't have an example for this, no. Though I vaguely remember that vue/volar/etc do something similar. |
Not being able to use it with |
Hi @kizu, I'm definitely open to a PR if you're interested. I do plan to take a look at this is in the future, but haven't had much time recently, sorry! |
hope support "composite: true" soon XD |
First, really thanks for this project! I've used this for a long time.
Today, I am upgrading the plugin to v5, but after upgrading, seems the Vscode cannot detected my scss module files with this plugin anymore.
I have a customer
global.d.ts
files specifying the typeBut in the v5 version of this plugin, it shows the following error
But actually, the file already included in the
tsconfig.json
. If I remove this plugin or downgrade to the v4 version, then the above error will disappear.And I have a very weird experience with the typescript v5 with this plugin also.
Any ideas about this in v5 version?
The text was updated successfully, but these errors were encountered: