Description
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.