HMR not working on /pages for projects named *.github.io
Closed this issue · 1 comments
elmasse commented
There is a reported issue with next v7.0.2 (vercel/next.js#5429) that prevents HMR to work with projects that contains .git
in the name.
I'm posting this to keep track of the issue resolution and for future reference the quick workaround is to set the webpackDevMiddleware watchOptions as follows using next.config.js
:
module.exports = {
webpackDevMiddleware(config) {
config.watchOptions = {
ignored: [
/\.git\//,
/\.next\//,
/node_modules/
]
}
return config;
}
}
elmasse commented
Fixed on next 7.0.3 / 8.0.0