typescript-plugin-css-modules not working with @use rule inside scss module

Viewed 444

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

1 Answers

Thanks to Liam I figured out that the problem has already been reported as a bug on the repo.

Related