You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @clinyong thank you so much for this plugin. 👏 I found it after many frustrating hours trying to get Gatsby + Typescript to play well with scss modules, including gatsby-plugin-scss-typescript and typescript-plugin-css-modules. This plugin adds both code-completion and jump-to-class-definition, hooray! 😅
There are a few other issues and PRs open for absolute-path support and curly-brace module import support for styles, both things that our team would welcome!
There's also one feature that would make this really feel complete with Typescript: the ability to see an error on the class name if it's incorrect. For example, if you change a class name in the scss file, currently it does not show an error in VS Code on the lookup like className={styles.staleClass}.
I'm not sure if that would require the TS language plugin (typescript-plugin-css-modules) to make work, but at least for me I can't currently use that plugin with Gatsby 3 import * as styles syntax.
The text was updated successfully, but these errors were encountered:
Hi @mosesoak, I wrote this to solve my own css modules problem first, but so happy to see the plugin can help people like you. I'm sorry that I'm not maintaining this plugin well because of my busy work.
I will see the absolute-path PR this weekend, other issues maybe later. And about the type checking feature, I'm not sure I can solve it, but glad to have a try.
Sounds good, thanks @clinyong ! The author of the language plugin, @mrmckeb, made some fixes as well. He does have type-checking working, but hasn't gotten jump-to-definition nailed as you have, and also ran into issues with absolute paths. Maybe you two should put your heads together on a working solution for this! It would be neat if a vs code plugin like this could wrap the language plugin features to offer one solid way that VS Code users could get modules & typescript to play nicely together. Thanks again for your work!
Hi @clinyong thank you so much for this plugin. 👏 I found it after many frustrating hours trying to get Gatsby + Typescript to play well with scss modules, including
gatsby-plugin-scss-typescript
andtypescript-plugin-css-modules
. This plugin adds both code-completion and jump-to-class-definition, hooray! 😅There are a few other issues and PRs open for absolute-path support and curly-brace module import support for styles, both things that our team would welcome!
There's also one feature that would make this really feel complete with Typescript: the ability to see an error on the class name if it's incorrect. For example, if you change a class name in the scss file, currently it does not show an error in VS Code on the lookup like
className={styles.staleClass}
.I'm not sure if that would require the TS language plugin (
typescript-plugin-css-modules
) to make work, but at least for me I can't currently use that plugin with Gatsby 3import * as styles
syntax.The text was updated successfully, but these errors were encountered: