css-modules / webpack-demo

Working demo of CSS Modules, using Webpack's css-loader in module mode
https://css-modules.github.io/webpack-demo/
1.49k stars 180 forks source link

mistake in README #38

Closed EwaMakowska closed 7 years ago

EwaMakowska commented 7 years ago

Webpack configuration is wrong. After adding

loader: 'style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'

i have error: ERROR in ./src/App.jsx Module not found: Error: Can't resolve 'style' in 'C:\projects\transEdu_04.2-test\transEdu-carriersRanking'

-src --app.jsx --css ---style.css

in app.jsx:


.
.
.
import styles from './css/style.css';
.
.
.
<div className={styles.test}>test</div>
EwaMakowska commented 7 years ago

OK, there's just big mistake in README. It should be: loader: 'style-style!css-loader?modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'

One, my mistake that I had not recognised it earlier; second: it should be correct there.