Enable reload on custom logic#66
Conversation
|
Maybe we could change the logic more globally/configureable.
I currently have no time to try it but i think the above two logics are obsolet because we got the function For your example maybe its just enough to disable the compilationHash option because your files will exists in compilation.children. @statianzo or am i wrong or forgot something? |
| @@ -152,7 +155,7 @@ class LiveReloadPlugin { | |||
| if ( | |||
| this._isRunning() | |||
| && include.length > 0 | |||
There was a problem hiding this comment.
I just tested this code and in my case include.length is already 0 since none of the "assets" in the compilation has changed. In my scenario the shouldReload-call should need to "winn" over the include as well.
Co-authored-by: Marc Itzenthaler <itzenthaler@web-mi.de>
Usually page gets reloaded when compilation hash changes, but sometimes it may be desirable to reload even if hash stays the same. I.e.
CopyWebpackPlugincan emit changed files, but it doesn't change compilation hash, so the page doesn't reload. In this case you could check emitted files in options callback, to decide if reloading is required: