scripts
object:"start": "webpack-dev-server --mode development --open"
npm install html-webpack-plugin --save-dev
webpack.config.js
:const HtmlWebpackPlugin = require("html-webpack-plugin");
// within the module.exports object:
plugins: [
new HtmlWebpackPlugin({
filename: 'index.html',
template: './src/index.html'
})
]
filename:
option, use index.html
template:
is our starting html file, the one you make edits to