question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HMR not working on webpack 5.66.0

See original GitHub issue

Bug report

What is the current behavior? Hot module reloading is not working after updating webpack to v5.66.0.

If the current behavior is a bug, please provide the steps to reproduce.

  • Clone https://github.com/saltire/react-node-boilerplate.
  • Run npm i webpack@latest to update to 5.66.0.
  • Run npm run watch.
  • Modify src/App.jsx. The browser console reports bundle rebuilding twice, the request to main.xxxxx.hot-update.json fails with status 404, and the app does not update.

Notice the issue does not occur if webpack 5.65.0 is installed.

What is the expected behavior? When making a change to a jsx file, the app should reload automatically.

Other relevant information: webpack version: 5.66.0 Node.js version: 16 Operating System: MacOS Additional tools

This repo uses webpack-dev-middleware, webpack-hot-middleware, react-refresh, and @pmmmwh/react-refresh-webpack-plugin, among other packages. The issue may stem from a conflict with one of these, but I don’t have enough internal knowledge of webpack or these packages to say which. It could also be a misconfiguration on my part. I’m filing the issue with webpack because I was able to isolate the problem to an update of this package.

Let me know if you need any more info!

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:34 (19 by maintainers)

github_iconTop GitHub Comments

4reactions
ckkencommented, May 31, 2022

no work in v 5.72.1

4reactions
rigor789commented, Jan 24, 2022

@alexander-akait yeah, that’s what I think as well, we’ve been seeing double bundling on our side - though often times, the hash doesn’t change, but the files are deleted from the output directory. I’m trying to bisect when this started happening, I’ll post my results here shortly

Update: it’s starting from 5.66.0 - any prior version I tried (5.65.0, 5.64.4, 5.62.0, 5.64.0, 5.62.0) works as expected.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] Proxy stopped working - Help Requests
I updated most packages and proxy stopped working. ... Here, you can see the proxy is configured: $ npm run start > myapp@1.0.0...
Read more >
How can I get hot reloading (HMR) running with Webpack 5?
I am trying to get HMR running with webpack v5, but it does not work. When I modify and save a file, webpack...
Read more >
Hot Module Replacement - webpack
Hot Module Replacement (or HMR) is one of the most useful features offered by webpack. It allows all kinds of modules to be...
Read more >
How to configure Webpack Hot Module Reloading (HMR ...
You recently had some reason, probably work related, to configure Webpack from scratch using the Node API. This is because of reasons (for ......
Read more >
webpack: Versions | Openbase
fix RemoteModules when using HMR (Module Federation + HMR) ... see https://github.com/webpack/webpack/issues/14893. Bugfixes ... 5.66.01yr ago.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found