I have a problem with react-css-modules. I am not able to find the classes that I have bound by the styleName. They do not appear as classes in the rendered html.
Here is the code:
import React from 'react';
import CSSModules from 'react-css-modules';
import styles from './ListItem.css'
@CSSModules(styles)
export class ListItem extends React.Component {
render() {
return (
<li className="panel" styleName="list-item">
<h3 className="uppercase m-t-0 m-b-0 relative" styleName="title">
...
</h3>
</li>);
}
}
And the webpack
configuration:
module: {
loaders: [
...
{
test: /\.css$/,
loaders: [
require.resolve('style-loader'),
require.resolve('css-loader') + '?sourceMap&modules&importLoaders=1&localIdentName=[name]__[local]___[hash:base64:5]'
]
},
...
]
}
So what is wrong here?