https://github.com/James2516/hot-reload
I'm trying to add hot loader to an existing webpack project.

It detected file changes but did not reload the component.
To reproduce:
yarn && yarn start- change
src/App.jscontent
https://github.com/James2516/hot-reload
I'm trying to add hot loader to an existing webpack project.

It detected file changes but did not reload the component.
To reproduce:
yarn && yarn startsrc/App.js contentCopyright © 2021 Jogjafile Inc.
The examples are taken from https://gaearon.github.io/react-hot-loader/getstarted/#step-2-of-3-using-hmr-to-replace-the-root-component, though it seems as though you already followed this guide.
The first problem is that
[HMR] Waiting for update signal from WDS...is printed to the console twice, and any attempted recompiles also occur twice. This is caused by yourentryin./config/webpack/Dev.jsbeing:The first few steps of the guide have the entry point as:
Step 3a under Step 3 (of 3): Adding React Hot Loader to preserve component state instructs you to modify the
entryofwebpack.config.jsto look like:react-hot-loaderhandles what these two entries were previously doing, so they can be replaced with'react-hot-loader/patch'.So your new entry point should be:
Next, Step 3b in the same section has a code snippet that looks like:
Changing your
module.hotblock to:Correctly reloads the component, so it doesn't make sense that following Step 3c breaks HMR.
Which you did correctly in
.babelrc. The only problem is that in./config/webpack/Base.jsyou have:This causes
babel-loaderto use these presets instead of the ones defined in.babelrc. Removingqueryin this rule and changingpresetsin.babelrcto:Correctly enables HMR with your
module.hotblock as: