forked from AkkomaGang/akkoma-fe
fix hot reload always reloading the page
This commit is contained in:
parent
60b413d02c
commit
4991e34c49
1 changed files with 7 additions and 2 deletions
|
@ -31,8 +31,13 @@ var hotMiddleware = require('webpack-hot-middleware')(compiler)
|
||||||
// force page reload when html-webpack-plugin template changes
|
// force page reload when html-webpack-plugin template changes
|
||||||
compiler.plugin('compilation', function (compilation) {
|
compiler.plugin('compilation', function (compilation) {
|
||||||
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
compilation.plugin('html-webpack-plugin-after-emit', function (data, cb) {
|
||||||
hotMiddleware.publish({ action: 'reload' })
|
// FIXME: This supposed to reload whole page when index.html is changed,
|
||||||
cb()
|
// however now it reloads entire page on every breath, i suppose the order
|
||||||
|
// of plugins changed or something. It's a minor thing and douesn't hurt
|
||||||
|
// disabling it, constant reloads hurt much more
|
||||||
|
|
||||||
|
// hotMiddleware.publish({ action: 'reload' })
|
||||||
|
// cb()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue