Skip to content

Commit

Permalink
Added CSS modules configuration for webpack plugin (#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
toneb authored Aug 31, 2020
1 parent c23442c commit 10060d9
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions plugins/plugin-webpack/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ module.exports = function plugin(config, args) {
},
{
test: /\.css$/,
exclude: /\.module\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
Expand All @@ -249,6 +250,20 @@ module.exports = function plugin(config, args) {
},
],
},
{
test: /\.module\.css$/,
use: [
{
loader: MiniCssExtractPlugin.loader,
},
{
loader: "css-loader",
options: {
modules: true
}
},
],
},
{
test: /.*/,
exclude: [/\.js?$/, /\.json?$/, /\.css$/],
Expand Down

0 comments on commit 10060d9

Please sign in to comment.