Skip to content

Commit

Permalink
build(webpack): update css-loader url filter setting to filter out al…
Browse files Browse the repository at this point in the history
…l svgs (#316)
  • Loading branch information
b-kelly committed May 2, 2024
1 parent b177beb commit 6d2c829
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions config/webpack.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,10 @@ module.exports = (_, argv) => {
{
loader: "css-loader",
options: {
importLoaders: 2,
importLoaders: 1,
url: {
filter: (_, resourcePath) => {
// Disable url handling for @stackoverflow/stacks
return !resourcePath.includes(
"@stackoverflow/stacks"
);
},
// let our svg rule handle importing svg files everywhere
filter: (url) => url.endsWith(".svg"),
},
},
},
Expand Down

0 comments on commit 6d2c829

Please sign in to comment.