title: import scss in react component
body: <p>I have this webpack.config file:</p>
  
  <pre><code>const path = require('path')
  
  var config = {
     entry: './src/index.js',
     output: {
        path:'/',
        filename: 'bundle.js',
     },
     devServer: {
        inline: true,
        port: 8080,
        historyApiFallback: {
          index: 'index.html'
        }
     },
     module: {
       loaders: [
         {
          test: /\.jsx?$/,
          exclude: /node_modules/,
          loader: 'babel-loader',
          query: {
          presets: ['es2015', 'react']
          }
        },
        {
          test: /\.scss$/,
          loaders: ["style", "css", "sass"]
        },
      ]
     },
      resolve: {
          modules: [path.resolve(__dirname, "src"), "node_modules"]
      }
  }
  module.exports = config;
  </code></pre>
  
  <p>and when I want to import a style I get this error:</p>
  
  <p>Uncaught Error: </p>
  
  <blockquote>
    <p>Cannot find module "./style.scss" at webpackMissingModule (bundle.js:77680) at Object.defineProperty.value (bundle.js:77680) at webpack_require (bundle.js:20) at Object.defineProperty.value (bundle.js:77611) at webpack_require (bundle.js:20) at Object.defineProperty.value (bundle.js:77047) at webpack_require (bundle.js:20) at Object.defineProperty.value (bundle.js:50608) at webpack_require (bundle.js:20) at Object.defineProperty.value (bundle.js:50310)</p>
  </blockquote>
  
  <p>and this is the component:</p>
  
  <pre><code>...
  import './style.scss';
  
  class Solution extends Component {
    render() {
      return (
        ...
      )
    }
  }
  
  export default Solution;
  </code></pre>
  
  <p>the scss file is in the same folder has the component.</p>