Thanks.
webpack/hot/dev-server reloads when applying HMR fails. webpack/hot/only-dev-server doesn't reload when applying HMR fails.
@SpaceK33z Thanks. I wrote a demo to test it. But it seems nothing different.
I made a syntax error to test it . But both of them reload the browser. Am I correct?
What version of webpack-dev-server are you running? This is not fully supported on webpack v1 yet. Also see https://github.com/webpack/webpack-dev-server/issues/655.
@mrdulin ping ^
I'm closing this issue because of inactivity. Feel free to comment, and we can always re-open it again.
hot/only-dev-server” Vs “/hot/dev-server”
They both are simple JS libraries and provide HMR interface for webpack-dev-server’s client JS(part of WDS) that’s also loaded into the browser(See my Webpack And The HMR for more details).
You can use just one of them. The main difference is as follows:
only-dev-server doesn’t reload the browser upon syntax errors. This is recommended for React apps because it keeps the state.
dev-server tries HMR (default). If there is any issue, it reloads the entire browser.
Link:
https://medium.com/@rajaraodv/webpacks-hmr-react-hot-loader-the-missing-manual-232336dc0d96
Most helpful comment
webpack/hot/dev-serverreloads when applying HMR fails.webpack/hot/only-dev-serverdoesn't reload when applying HMR fails.