run-script-webpack-plugin
run-script-webpack-plugin copied to clipboard
Detect HMR and disable autoRestart if one is presented
#20 related
Ideally, the code would be smart enough to detect that HMR is in use, but at the minimum, there should be documentation present regarding the autoRestart flag.
have you figure it this out ?
At that time I was thinking about moving dev server from backend to root webpack config- an array of configurations. But I haven't managed to make it properly (so that hmr hooks up properly, etc), it was easier for me to make backend code changes and restart client app in browser if needed. The thing is this exact issue is out of scope of this particular plugin IMHO. It does what it does, hmr should be resolved separately. While I was writing this, I came to an idea to make a debounced delay for restart to let HMR send the changes to the client and then restart the script (I am not sure if plugin has an access to the inner webpack instance of client)
I think you can get hmr info inside the plugin, we just need to figure it out how