Hot Module Replacement not working
See original GitHub issueI tried following this tutorial to get Hot Module Replacement working in my app. Everything appears to be working in the console, except the update never happens. For instance, if I change a file, I’ll see these logs:
webpack-dev-server: Hot Module Replacement enabled. jsx.js:481
(2) webpack-dev-server: App updated. Recompiling... jsx.js:485
webpack-dev-server: App hot update... jsx.js:515
But never anything like:
***** Updated Main.scss ***** jsx.js
Updated modules: jsx.js
Here’s a repo demonstrating the issue. I’ve tried changing both script files and stylesheets; however, neither triggers a complete update.
How do I get HMR working?
Issue Analytics
- State:
- Created 9 years ago
- Comments:22 (8 by maintainers)
Top Results From Across the Web
webpack hot module replacement not working - Stack Overflow
So I want to hot reload the page whenever I change the background color of the span located in my html page. when...
Read more >Error: "Hot Module Replacement (HMR) is not enabled!" #169
I'm getting this error: [React Refresh] Hot Module Replacement (HMR) is not enabled! React Refresh requires HMR to function properly.
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 >Webpack's Hot Module Replacement Feature Explained
Hot Module Replacement is a feature that enables you to see code changes in the browser without having to refresh it, allowing you...
Read more >Hot-module-replacement not working? - Meteor forums
Hot -module-replacement not working? ... It's the first project where I use TailwindCSS and React 18, HMR worked before on other projects so...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The problem is, there are many different ways to configure this all. So you end up reading tutorials and one tells you to add the
HotModuleReplacementPlugin
and the other tells you to add the--hot
flag and somehow you end up having both.I think it’s very unexpected behavior. Normally, command line flags override global settings i.s.o. appending to them… especially when doing so actually breaks the setup.
webpack-dev-server --hot --inline
does not work. Just refreshes the page. I have spent almost 2 hours pulling my hair over this. Incredibly complex to get it right.