It turns out that babel-plugin-react-css-modules is using generic-names v2, which is different a bit with newer Webpack in the [hash].
generic-names v3 solve it. see this update.
So we can manually replace the generateScopedName with createGenerator from generic-names v3.
Like this
const createGenerator = require('generic-names');
const plugins = [
[
'babel-plugin-react-css-modules',
{
generateScopedName: createGenerator('[name]__[local]_[hash:base64:5]'),
exclude: 'node_modules',
},
],
];
I've done this in my own project and it works fine. Have a try. Best wishes~