You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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?
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.
Activity
SpaceK33z commentedon Oct 17, 2016
webpack/hot/dev-server
reloads when applying HMR fails.webpack/hot/only-dev-server
doesn't reload when applying HMR fails.mrdulin commentedon Oct 17, 2016
@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?SpaceK33z commentedon Oct 17, 2016
What version of webpack-dev-server are you running? This is not fully supported on webpack v1 yet. Also see #655.
SpaceK33z commentedon Oct 24, 2016
@mrdulin ping ^
SpaceK33z commentedon Oct 29, 2016
I'm closing this issue because of inactivity. Feel free to comment, and we can always re-open it again.
r4raziel commentedon Jun 25, 2020
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