title: Module build failed (from ./node_modules/css-loader/dist/cjs.js): CssSyntaxError
body: <p>im building a react app and i imported a slider in a file</p>
  <p>and then i got a css-loader, im also using webpack</p>
  <p>here is my slider -</p>
  <pre><code>import React, {useState} from 'react';
  import RubberSlider from '@shwilliam/react-rubber-slider';
  import styles from '@shwilliam/react-rubber-slider/dist/styles.css';
  
  export const Slider = () =&gt; {
    const [value, setValue] = useState(0.5)
  
    return &lt;RubberSlider width={250} value={value} onChange={setValue} /&gt;
  }
  </code></pre>
  <p>this ^ will go in another component and get called on</p>
  <p>but all is well when i comment out -</p>
  <pre><code>import styles from '@shwilliam/react-rubber-slider/dist/styles.css';
  </code></pre>
  <p>but i need these styles for the slider,
  when i run my webpack command i get this err -</p>
  <pre><code>ERROR in ./src/index.js (./node_modules/css-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js!./src/index.js)
  Module build failed (from ./node_modules/css-loader/dist/cjs.js):
  CssSyntaxError
  
  (1:1) /Users/eddy/Projects/Sorting-Visualizer/src/index.js Unknown word
  
  &gt; 1 | import React from 'react';
      | ^
    2 | import ReactDOM from &quot;react-dom&quot;;
    3 | import App from &quot;./App.js&quot;;
  </code></pre>
  <p>here is my webpack.config.js file -</p>
  <pre><code>const path = require(&quot;path&quot;);
  const config = {
  
      entry: &quot;./src/index.js&quot;,
      output: {
          path: path.resolve(__dirname, &quot;dist&quot;),
          filename: &quot;bundle.js&quot;,
      },
  
      resolve: { extensions: [&quot;.mjs&quot;, &quot;.js&quot;, &quot;.jsx&quot;, &quot;.css&quot;] },
  
      module: {
          rules: [
              {
                  test: /\.js|jsx|.css$/,
                  use: [  &quot;style-loader&quot;, &quot;css-loader&quot;, &quot;babel-loader&quot;],
                  exclude: /node_modules/,
                  // loader: &quot;style-loader!css-loader&quot;
              },
  
          ]
      },
  
  }
  
  module.exports = config;
  </code></pre>
  <p>what am i doing wrong?
  Thank you!</p>