Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

What's the difference between webpack/hot/dev-server and webpack/hot/only-dev-server? #658

Closed
mrdulin opened this issue Oct 17, 2016 · 6 comments
Labels

Comments

@mrdulin
Copy link

mrdulin commented Oct 17, 2016

Thanks.

@SpaceK33z
Copy link
Member

webpack/hot/dev-server reloads when applying HMR fails. webpack/hot/only-dev-server doesn't reload when applying HMR fails.

@mrdulin
Copy link
Author

mrdulin commented 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
Copy link
Member

What version of webpack-dev-server are you running? This is not fully supported on webpack v1 yet. Also see #655.

@SpaceK33z
Copy link
Member

@mrdulin ping ^

@SpaceK33z
Copy link
Member

I'm closing this issue because of inactivity. Feel free to comment, and we can always re-open it again.

@r4raziel
Copy link

r4raziel commented 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants