I started learning React and now I\'m trying to understand what is the purpose of the index.js
and App.js
which are created by by running create-react-
create-react-app
use a plugin for webpack that name is html-webpack-plugin and this plugin use index.js
for entrypoint like below :
const HtmlWebpackPlugin = require('html-webpack-plugin')
module.exports = {
entry: 'index.js',
output: {
path: __dirname + '/dist',
filename: 'index_bundle.js'
},
plugins: [
new HtmlWebpackPlugin()
]
}
this plugin use for generating html file.