the file directory structure is roughly as follows:
In
index.html, dist/index.js is directly introduced into
< script src= ". / dist/index.js" > < / script >
executes the command "webpack--watch & webpack-dev-server"
and finds that dist/index.js is updated when you change the files in the src directory, but index.html does not have reload.
ask: when changing the original src file, how can I reload index.html? at the same time?
// webpack.config.js devServer
devServer: {
contentBase: __dirname,
host: ip,
port: 8081,
historyApiFallback: true
}