Use CSS modules without the .module
suffix
#39
Replies: 4 comments
-
Hi @guidokessels, thanks for the feedback! This is currently not possible, however I've just discovered https://github.com/Summer-andy/vite-plugin-transform-css-modules which I could easily add as a default plugin to React Preview. Let me try that out and come back to you (give me a few days!). |
Beta Was this translation helpful? Give feedback.
-
Good news, this is now merged in React Preview. Coming to you later this week, once I've stabilised a few remaining bugs :) |
Beta Was this translation helpful? Give feedback.
-
Hey @guidokessels, this is now live in v0.4.2 🙂 |
Beta Was this translation helpful? Give feedback.
-
Hey, sorry for the late response -- I was on holiday :) This seems to work great with the latest version. Thanks a lot! |
Beta Was this translation helpful? Give feedback.
-
I just tried out React Preview and I really like what I see so far!
I had some issues getting the CSS to work. We use CSS modules and the CSS import in the TS file was empty. I had to rename the file from
MyComponent.scss
toMyComponent.module.scss
for React Preview to treat it as a CSS module and populate the import.Would it be possible to use CSS modules without the
.module
suffix?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions