title: Webpack won't compile my SASS with background-image
body: <p>I have issue compiling my SASS code.
  I would like to use a background image, but when I tried this, all my css stopped working.</p>
  
  <p>My SASS file looks like this</p>
  
  <pre><code>@import "~bootstrap/scss/bootstrap";
  @import "constants";
  
  #crossroad {
    position:relative;
    background-image: url("../assets/bg.jpg");
  }
  </code></pre>
  
  <p>My Webpack.config</p>
  
  <pre><code>const path = require('path');
  
  module.exports = {
    entry: './src/app.js',
    output: {
      filename: 'bundle.js',
      path: path.resolve(__dirname, 'dist')
    },
    mode: "development",
    module: {
      rules: [
        {
          test: /\.(scss|png|jpg)$/,
          use: [
            {
              // Adds CSS to the DOM by injecting a `&lt;style&gt;` tag
              loader: 'style-loader'
            },
            {
              // Interprets `@import` and `url()` like `import/require()` and will resolve them
              loader: 'css-loader'
            },
            {
              // Loader for webpack to process CSS with PostCSS
              loader: 'postcss-loader',
              options: {
                plugins: function () {
                  return [
                    require('autoprefixer')
                  ];
                }
              }
            },
            {
              // Loads a SASS/SCSS file and compiles it to CSS
              loader: 'resolve-url-loader'
            },
            {
              // Loads a SASS/SCSS file and compiles it to CSS
              loader: 'sass-loader'
            }
          ]
        }
      ]
    }
  };
  </code></pre>
  
  <p>ERROR MESSAGE:</p>
  
  <blockquote>
    <p>ERROR in ./src/assets/bg.jpg (./node_modules/css-loader/dist/cjs.js!./node_modules  /postcss-loader/src??ref--4-2!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js!./src/assets/bg.jpg)<br>
    Module build failed (from ./node_modules/sass-loader/dist/cjs.js):<br>
    SassError: Invalid CSS after "����": expected "{", was ""<br>
            on line 1 of /Users/adrianmindek/Code/PersonalPage/src/assets/bg.jpg  </p>
    
    <blockquote>
      <p>����<br>
         ^<br>
       @ ./src/assets/bg.jpg 2:26-236<br>
       @ ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/src??ref--  4-2!./node_modules/resolve-url-loader!./node_modules/sass-loader/dist/cjs.js!./src/scss/app.scss<br>
       @ ./src/scss/app.scss<br>
       @ ./src/app.js  </p>
    </blockquote>
  </blockquote>
  
  <p>I tried to add <code>resolve-url-loader</code> to my webpack config, but nothing changed.</p>