title: Disable resolving for CSS/SASS/SCSS/LESS URLs in Webpack 5
body: <p>In SASS, I have a CSS rule with a URL that looks like:</p>
  <pre><code>.eSearchFAQsAccord-q {
    &amp;::after {
      content: url(&quot;./images/caret.svg&quot;);
    }
  }
  </code></pre>
  <p>By default, Webpack will resolve this (though it chokes on my SVG). I want it to NOT resolve. I want the browser to load this image separately, from my <code>static</code> directory.</p>
  <p>I'm not sure what to say about what I've tried so far. I've tried a <em>lot</em> of settings from around the web in my Webpack config that didn't work...</p>
  <p>Here's my Webpack config, which I think is pretty out-of-the-box:</p>
  <pre><code>const CopyWebpackPlugin = require(&quot;copy-webpack-plugin&quot;);
  
  module.exports = {
    mode: &quot;development&quot;,
    entry: {
      index: `./src/index.js`,
    },
    target: &quot;web&quot;,
    output: {
      path: `${__dirname}/dist`,
      filename: &quot;[name].js&quot;,
    },
    plugins: [
      new CopyWebpackPlugin({
        patterns: [{ from: &quot;static&quot; }],
      }),
    ],
    devServer: {
      hot: true,
      inline: true,
      host: &quot;localhost&quot;,
      port: 8080,
      watchOptions: {
        poll: true,
      },
    },
    module: {
      rules: [
        {
          
          test: /\.s[ac]ss$/i,
          use: [
            &quot;style-loader&quot;,
            {
              loader: &quot;css-loader&quot;,
              options: {
                sourceMap: true,
              },
            },
            {
              loader: &quot;sass-loader&quot;,
              options: {
                sourceMap: true,
              },
            },
          ],
        },
        {
          test: /\.js$/,
          enforce: &quot;pre&quot;,
          use: [&quot;source-map-loader&quot;],
        },
      ],
    },
  };
  </code></pre>
  <p>I'm sure my issue is because I don't have intimate knowledge of Webpack, but the documentation I don't think is particularly intuitive at a glance.</p>