Open flykiro opened 6 years ago
@flykiro could you please attach the babel config?
Having a similar issue with this config:
{
plugins: [
[
require.resolve('babel-plugin-react-css-modules'),
{
generateScopedName: '[name]__[local]',
removeImport: process.env.NODE_ENV !== 'development',
filetypes: {
'.scss': {
syntax: 'postcss-scss',
},
},
},
],
],
}
Having troubles resolving the styleName for the .button--primary
class in the example below.
.button {
background-color: grey;
&--primary {
background-color: green;
}
}
Did you try configuring https://github.com/postcss/postcss-nested
under the plugins key?
"filetypes": {
".scss": {
"syntax": "postcss-scss",
"plugins": [
"postcss-nested"
]
}
}
See https://github.com/postcss/postcss-scss/issues/56 for a reference.
@sthzg That seems to have fixed it, thanks!
use
and then