-
Notifications
You must be signed in to change notification settings - Fork 74
Works fine in compilation, problem with VS Code #113
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
Also, I tried downgrading the package to version 3.1.0, but the same is still happening. I also tried creating a custom.d.ts file, but I had no luck. What am I missing? |
I couldn't find a way to make it work. So, I uninstalled and I went for this VS Code plugin: https://github.com/clinyong/vscode-css-modules. It doesn't have error highlighting neither error in compilation time, but at least it autocompletes. Sorry for linking to another repo, but maybe it helps someone. Thanks anyway. |
Hi @mmanna3, this works with Create React App today - we use that project for testing. If you could share a reproduction in a git repo, I can take a look at it and help to solve :) |
Hi! This is the repo: I created a branch named "typescript-plugin-css-modules" and each one of the three last commits are for configuration. The code is in the "Frontend" folder. Thanks a lot! |
Hi @mmanna3, that helped a lot! It looks like this issue is related to #24. Basically, we don't have default support for baseUrl, as it's not supported by default in Sass. You just need to change to the below in your
As I understand this is confusing, it might make sense to do this by default for Sass, with an opt-out flag. What are your thoughts? |
It works! Thank you! Yes, I think it would be great if at least this information was in the readme. If it was the default behaviour for Sass, even better. |
The code compiles OK, but in VS Code the plugin doesn't seem to be working.
As Microsoft docs said, I add the line
"typescript.tsdk": "node_modules\\typescript\\lib"
in my workspace settings. Also I tried "the alternative usage" adding this
to global settings.
I know that I am using the Workspace Typescript Version:

It's a Create React App.
Thanks in advance for any help.
The text was updated successfully, but these errors were encountered: