I have a SCSS module inside a Create React App project. I installed typescript-plugin-css-modules in order for Typescript to be able to "type" my module. I import it in my React component like this :
import s from "./core/layoutSidebar.module.scss";
Everything is working as expected as far as i don't import my variables into the module with the @use rule :
@use "style/helpers/variables";
If so, Typescript type the s imported module as an empty interface {} which makes my IDE throwing errors on my classNames.
Even if I only use the variables syntaxe (eg : $spacing-1) the same error happens again
Thanks to Liam I figured out that the problem has already been reported as a bug on the repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With