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.

"Uncaught Error: [HMR] Hot Module Replacement is disabled." appearing when adding special entry point

See original GitHub issue

I’m using webpack for tota11y and absolutely loving it, but I keep running into a problem with HMR and my config.

Following the instructions at http://webpack.github.io/docs/webpack-dev-server.html#hot-mode, I’ve added webpack/hot/dev-server as an entry point. Running

webpack-dev-server --hot

Everything works as expected, but the problem comes when I build with webpack -p. In doing so, I get the following error when running my bundle in a browser:

Uncaught Error: [HMR] Hot Module Replacement is disabled.

Grepping through my bundle I can see that error message, but why is this hot reloading code in my bundle?

I’ve since removed that bit from the entry field in my config, and hot reloading seems to work fine. So I remain a bit confused: do I not actually need webpack/hot/dev-server in my config? Are the docs outdated?

I checked around for this error but couldn’t find anything, so perhaps my problem runs deeper than that.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:2
  • Comments:29 (4 by maintainers)

github_iconTop GitHub Comments

163reactions
sokracommented, Jun 15, 2015

The docs are wrong… 😢

Just use webpack-dev-server --hot --inline and don’t anything special about webpack-dev-server or HMR to your webpack.config.js.

161reactions
sokracommented, Sep 9, 2015

Hot Module Replacement is disabled. means the HotModuleReplacementPlugin is not used.

--hot adds it. (because the CLI have access to your webpack configuration)

hot: true doesn’t add it. (because the API doesn’t have access to your webpack configuration)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught Error: [HMR] Hot Module Replacement is disabled
My understanding of using Hot Module Replacement is that its designed for making life easier during development, it should not be used in ......
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 Hot Module Replacement Hmr Working But ... - ADocLib
Uncaught Error : [HMR] Hot Module Replacement is disabled.appearing when adding special entry point #1151.Closed.jdan opened this issue on.
Read more >
How I solved and debugged my Webpack issue through trial ...
When webpack bundles your source code, it can become difficult to track down errors and warnings to their original location.
Read more >
react-hot-loader - npm
React-Hot-Loader is expected to be replaced by React Fast Refresh. Please remove React-Hot-Loader if Fast Refresh is currently supported on your ...
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