Hi all,
Was wondering if there was a way to ignore certain svg's or directories to not be converted into React components so they can be used elsewhere such as the background image of a div inside a CSS file using
background-image: url('../../mySvg.svg');
I have the same issue and it's not yet clear how webpack can help here. Can you please provide an example usage?
Nevermind, it's clear now.
module: {
rules: [
{ test: /\.(png|jpg|svg)$/i, issuer: /\.scss$/, use: "url-loader" },
{
test: /\.svg$/,
exclude: /login/,
issuer: /\.js$/,
use: ["@svgr/webpack"],
},
{
test: /\.scss$/i,
use: ["style-loader", "css-loader", "sass-loader"],
},
],
},
Most helpful comment
Nevermind, it's clear now.