title: Invalid configuration error while creating a react app with webpack configuration
body: <p>Unable to configure webpack with react</p>
  
  <p>below is error :</p>
  
  <p>Invalid configuration object. Webpack has been initialised using a configuration object that does not match the API schema.
   - configuration.entry['main'] should not contain the item '—' twice.
     -> A non-empty array of non-empty strings</p>
  
  <p>I have configured webpack and tried</p>
  
  <p>below is webpack.config.js</p>
  
  <pre><code> const path = require('path');
   const HWP = require('html-webpack-plugin');
   module.exports = {
     entry: path.join(__dirname, '/src/index.js'),
      output: {
      filename: 'build.js',
      path: path.join(__dirname, '/dist')},
  module:{
     rules:[{
         test: /\.js$/,
        exclude: /node_modules/,
         loader: 'babel-loader'
      }]
    },
    plugins:[
      new HWP(
         {template: path.join(__dirname,'/src/index.html')}
     )
    ]
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/3wDkl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3wDkl.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/0Wx4u.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0Wx4u.png" alt="enter image description here"></a></p>