Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Oluwa-nifemi/6c4f545125a6687ad1d5b299461c2c8f to your computer and use it in GitHub Desktop.
Save Oluwa-nifemi/6c4f545125a6687ad1d5b299461c2c8f to your computer and use it in GitHub Desktop.
config.module.rules.find(
rule => rule.test.toString() === '/\\.css$/',
).exclude = /\.module\.css$/;
config.module.rules.push({
test: /\.module\.css$/,
use: [
'style-loader',
{
loader: 'css-loader',
options: {
modules: true,
importLoaders: 1,
localIdentName: '[path]__[name]___[local]'
},
},
],
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment