I am attempting to exclude all *.html files so that the webpack devserver does not reload when those files change.
Here is what my configuration looks like:
const path = require('path');
module.exports = {
pages:
{
index:
{
entry: 'src/main.js',
template: 'public/Index.html'
}
},
outputDir: "wwwroot",
filenameHashing: true,
configureWebpack:
{
devServer: {
static: {
directory: path.join(__dirname, 'public'),
watch:
{
ignored: '*.html',
usePolling: false,
}
},
},
watchOptions:
{
aggregateTimeout: 3000,
ignored: /.*\.html/
}
}
}
I am using @vue/cli-service: 5.0.4 which utilizes webpack 5. However, it is not working as expected - when I change an html file, webpack dev-server still reloads the page. How can I make it work so that changing html pages will not trigger a reload?