Trying to figure out how to use css-modules with CRA, all I find is a Dan's tweet saying it can now, pointing to a pull request. I tried, but failed.
https://codesandbox.io/s/vyzlpplnzy
It works fine locally, it's a code-sandbox problem. I've downloaded your code and just did a yarn start. Also, you seem to be using an older build. Consider switching to a newer one.
https://github.com/facebook/create-react-app/issues/3815
@bugzpodder Thanks, by older build do you mean my syntax outdated, or codesandbox using an old version of react-scripts?
I meant older release of create-react-app (although css modules still works using it) that was referenced in code-sandbox, ie in your link it was using 2.0.0-next.b2fd8db8.
code-sandbox just doesn't seem to likee it even when I switched to the latest version.
Cool, glad to know it works and the problem is from codesandbox. I'm closing this. Thank you.
This shouldn't be closed as there is no documentation on using CSS modules in create-react-app. Is there plans to document this feature at some point?
Once create-react-app 2.0 is released. The documentation currently does not include CSS modules so not to confuse users on 1.14
Most helpful comment
This shouldn't be closed as there is no documentation on using CSS modules in create-react-app. Is there plans to document this feature at some point?