Unable to configure webpack with react
below is error :
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
I have configured webpack and tried
below is webpack.config.js
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')}
)
]
}


entry: { main: path.join(__dirname, '/src/index.js') },