Closed
Description
According to closed issue #4 generateScopedName
should be added to .babelrc
and its value should match the localIdentName
of the css-loader
.
However, when using the exact same value proposed there [path]___[name]__[local]___[hash:base64:5]
for both, the value is not the same. The class on the element and the generated class name are not the same. Both the path
and the hash
parts of the strings differ, so the style is not applied.
The html element is:
<div class="src-collectors-containers-___Collectors__root___3x28u">test</div>
But the class in the style tag is:
.collectors-containers-___Collectors__root___2F0Qi {
color: red;
}
My webpack reads:
rules: [{
test: /\.scss$/,
loaders: [
'style?sourceMap',
'css?modules&importLoaders=1&localIdentName=[path]___[name]__[local]___[hash:base64:5]',
'resolve-url',
'sass?sourceMap'
]
}
]
and my babelrc reads:
plugins: [
[
'react-css-modules',
{
generateScopedName: '[path]___[name]__[local]___[hash:base64:5]'
}
],
]
Just as in the examples, but it does not work.