gajus / babel-plugin-react-css-modules

Transforms styleName to className using compile time CSS module resolution.
Other
2.05k stars 162 forks source link

generated css module name doesn't matched the DOM class name #218

Closed SimGyun closed 5 years ago

SimGyun commented 5 years ago

I use babel-plugin-react-css-modules and css-loader to deal with my .scss files . But the generated css files's selector name does not matched the one in DOM class attribute.

Here is part of my webpack.config, I use webpack4.+

screen shot 2018-11-27 at 3 06 21 pm

And here is my .babelrc

screen shot 2018-11-27 at 3 07 03 pm

in one of my .jsx, write like this `import './styles.scss'

container
` and when I run,it did not work as expected. ![1543302541115](https://user-images.githubusercontent.com/14138164/49064876-41834a80-f257-11e8-8685-d45495c9265b.jpg) screen shot 2018-11-27 at 3 10 19 pm Appreciate!
gajus commented 5 years ago

https://github.com/gajus/babel-plugin-react-css-modules/issues/84