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

404 Not Found for <host>/__webpack_hmr #981

Closed
jonlambert opened this issue Jul 10, 2017 · 6 comments
Closed

404 Not Found for <host>/__webpack_hmr #981

jonlambert opened this issue Jul 10, 2017 · 6 comments
Labels

Comments

@jonlambert
Copy link

Do you want to request a feature or report a bug?
Report a bug.

What is the current behavior?
When running webpack-dev-server using the configuration detailed in the Gist below, the browser console emits http://localhost:8080/__webpack_hmr 404 (Not Found) errors, and HMR does not work correctly.

If the current behavior is a bug, please provide the steps to reproduce.
https://gist.github.com/jonlambert/2e38092c7527ec97329911882de29d91

What is the expected behavior?
For HMR to work correctly, with the client connecting to the websocket endpoint whilst using webpack-dev-server.

Please mention your webpack and Operating System version.

  • macOS Sierra
  • Webpack version 2.6.1
@Panoplos
Copy link

You can fix this issue by removing 'webpack-hot-middleware/client' from your webpack config.

@idangoldman
Copy link

Thank you @Panoplos and have a great day! :)

@amareshb
Copy link

@Panoplos I tried removing it and hot-reloading doesn't work for me.

@wuliupo
Copy link

wuliupo commented Jul 8, 2018

thanks @Panoplos. there are two ways for webpack-dev-server hot update:

  1. webpack-dev-server, hot=true, inline=true
  2. express server: webpack-dev-middleware + webpack-hot-middleware, __webpack_hmr
  const compiler = webpack(webpackConfig);
  webpackConfig.entry.app = ['webpack-hot-middleware/client', webpackConfig.entry.app];
  const devMiddleware = require('webpack-dev-middleware')(compiler, {});
  const app = express();
  app.use(devMiddleware);
  //...

@Verten
Copy link

Verten commented Sep 6, 2018

@wuliupo Thanks for the information

@aakhan89
Copy link

'webpack-hot-midd

I did the same, but not working

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

8 participants