title: Module not found: Error: Can't resolve './style.css' in Directory?
body: <p>I am trying to run the command <code>npm run build</code> but it is not working. and I am getting the error below:</p>
  
  <pre><code>&gt; typescript@1.0.0 build /Users/Prashant/Code/typescript
  &gt; webpack
  
  Hash: c6dbd1eb3357da70ca81
  Version: webpack 3.2.0
  Time: 477ms
      Asset     Size  Chunks             Chunk Names
  bundle.js  2.89 kB       0  [emitted]  main
     [0] ./src/index.js 51 bytes {0} [built]
     [1] ./src/index.css 290 bytes {0} [built] [failed] [1 error]
  
  ERROR in ./src/index.css
  Module build failed: Unknown word (5:1)
  
    3 | // load the styles
    4 | var content = require("!!./index.css");
  &gt; 5 | if(typeof content === 'string') content = [[module.id, content, '']];
      | ^
    6 | // Prepare cssTransformation
    7 | var transform;
    8 |
  
  
  @ ./src/index.js 1:0-22
  </code></pre>
  
  <p>My web pack config file(webpack.config.js) is:</p>
  
  <pre><code>var path = require('path');
  
  module.exports = {
      entry: './src/index.js',
      output: {
          path: path.resolve(__dirname, 'dist'),
          filename: 'bundle.js'
      },
      module: {
          rules: [
              {
                  test: /\.css$/,
                  use: [
                      'css-loader',
                      'style-loader'
                  ]
              }
          ]
      }
  };
  </code></pre>
  
  <p>And my CSS file(index.css) is </p>
  
  <pre><code>body {
      color:red;
  }
  </code></pre>
  
  <p>and my js file index.js is below:</p>
  
  <pre><code>require("./index.css");
  alert('this is my alert');
  </code></pre>
  
  <p>I am trying to run the file but it is not working I have checked all the spelling also try to add a lot of other CSS but it is not working, can you please help me how can I solve this issue?</p>