At the moment local css selector names compiles to meaningless hashes.
For example: :local .foo{} compiles to: ._15QQawvrl5PrjGf9wGoYAO{}
Would be better if original names were prepended to hashes after compilation.
Weird.
My build has no that kind of hash-names.
For example, this was my last build deployed (link may be broken in a few days after next deploy).
What do you do to get those classnames?
Did you ejected create-react-add and changed something in configs?
It works when I import css and mark it as local.
For example:
Inside style.css
:local .foo{}
Inside component.jsx
import style from ./style.css
<div className={style.foo}></div>
See https://github.com/facebookincubator/create-react-app/issues/90. :local is a css module syntax. There's a PR open to add css modules for .module.css in https://github.com/facebookincubator/create-react-app/pull/2285 which is in progress
We currently don't support CSS Modules and they work accidentally (because we didn't explicitly disable them).
Please do not be surprised if they break until #2285 is merged; see #90 for history as suggested by @kennethtruong.
I'll close this as a dup. Thanks!