-
Notifications
You must be signed in to change notification settings - Fork 73
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
Autocomplete not working with global path #227
Comments
@abaksha-sc check on 4.2.3, because it`s work for me |
I think issue is in this line typescript-plugin-css-modules/src/index.ts Line 157 in 2e50207
getResolvedModuleWithFailedLookupLocationsFromCache is not defined by default in TS, like in my VSCode language server it stays undefined for TS 4.9.5 and 5.1.3 (haven't tested others).
Which config can I use to have Another challenge that we can override Update: For us the issue with
on line https://github.com/mrmckeb/typescript-plugin-css-modules/blob/2e502074b9f370dd8d970bc7e6e8a970bf57ba59/src/index.ts#LL205C10-L205C10 solves our issue, would be nice to have something similar included |
Also facing this issue so having to just use relative paths which isn't ideal. It would be great to get hints working for absolute paths, especially as the '@/...' style is becoming more common. |
@mrmckeb when will this fix be published in npm? |
Describe the bug
Next.js often use global path alias
@
for sources (defines intsconfig.json
through"baseUrl": "."
and"paths": { "@/*": ["./src/*"] }
).And in this case autocomplete for CSS-module doesn't work.
To Reproduce
Steps to reproduce the behavior:
import styles from "@/styles/home.module.scss";
styles
on line 8.Expected behavior
Please modify sources:
import styles from "@/styles/home.module.scss";
import styles from "../styles/home.module.scss";
styles
on line 8.In this case you will see the valid definition with CSS-classes as object keys like:
TypeScript version: 5.0.4
Plugin version: 5.0.1
The text was updated successfully, but these errors were encountered: