FYI This does not just work out of the box, it requires a compiler with the right configuration. Perhaps you could add some setup instructions to the post, or at least mention this prerequisite.
Other than that, yeah, CSS Modules are awesome! Very performant, easy to work with, and with the right compiler config you could even use SASS.
Yes through css-loader likely. What platform (e.g. Create React App / Next.js / Nuxt / etc.) would you usually use as a base if you don't mind me asking?
FYI This does not just work out of the box, it requires a compiler with the right configuration. Perhaps you could add some setup instructions to the post, or at least mention this prerequisite.
Other than that, yeah, CSS Modules are awesome! Very performant, easy to work with, and with the right compiler config you could even use SASS.
Thanks for the suggestions man. I'll add it there.
I guess the compiler is included in webpack
Yes through
css-loader
likely. What platform (e.g.Create React App
/Next.js
/Nuxt
/ etc.) would you usually use as a base if you don't mind me asking?Create react app mostly. Sometimes Gatsby.