I changed the webpack.config.dev.js and webpack.config.prod.js both in the config folder and in node_modules/react-scripts/config folder to allow for CSS modules like this:
test: /\.css$/,
loader: ExtractTextPlugin.extract(
Object.assign(
{
fallback: require.resolve('style-loader'),
use: [
{
loader: require.resolve('css-loader'),
options: {
importLoaders: 1,
modules: true,
localIdentName: '[name]__[local]__[hash:base64:5]'
When I run my app in dev mode with npm start
it works just fine and the CSS modules apply correctly.
However, when I build
my app and deploy it to Firebase the CSS styling disappears.
Is this a common issue? How can I solve it?