title: Webpack: getting this error: build failed (from ./node_modules/css-loader/dist/cjs.js):
body: <p>When running Webpack, I get the following error:</p>
  
  <p>./src/css/main.css 3.62 KiB {0} [not cacheable] [built] [failed] [1 error]</p>
  
  <p>ERROR in ./src/css/main.css
  Module build failed (from ./node_modules/css-loader/dist/cjs.js):
  ...
        accumulator[normalizedUrl] = { ...accumulator[normalizedUrl],
                                       ^^^
  ...</p>
  
  <p>webpack.config.js:</p>
  
  <pre><code>    module: {
        rules: [
          {
           test: /\.css$/i,
           use: ['css-loader']
          }
        ]
      }
  </code></pre>
  
  <p>css:</p>
  
  <pre><code>    body {
        background-color:purple;
      }
  </code></pre>
  
  <p>js:</p>
  
  <pre><code>    import css from '../css/main.css';
  </code></pre>
  
  <p>on js file, if I enter </p>
  
  <pre><code>    import '../css/main.css';
  </code></pre>
  
  <p>I get the same error.</p>
  
  <p>I'd appreciate your help please.</p>