React Hot MD guide app configuration won't hot reload
After following the steps of the React HMR guide I am left with an app that won't hot reload.
What happens is on every file change of the App.js the browser does reload, and it seems from the webpack-dev-server log as if the module rebundles, but nothing happens.
[HMR] Waiting for update signal from WDS... does print to the browser console although no changes are seen in the browser. The only way I've been getting app changes to register with this config is if I manually run webpack.
What should the index.html look like?
I also have an issue with this guide, I'm getting an You may need an appropriate loader to handle this file type. error for my index.js for some reason.
@timurtu @macbem
I ran through the React HMR guide and it ran fine on my local. I'm running:
- ubuntu 16.04 LTS
- node v6.1.0
- npm v4.0.5
- "devDependencies": { "babel": "^6.5.2", "babel-core": "^6.13.2", "babel-loader": "^6.2.4", "babel-preset-es2015": "^6.13.2", "babel-preset-react": "^6.11.1", "babel-preset-stage-2": "^6.13.0", "css-loader": "^0.23.1", "postcss-loader": "^0.9.1", "react-hot-loader": "^3.0.0-beta.6", "style-loader": "^0.13.1", "webpack": "^2.1.0-beta.25", "webpack-dev-server": "^2.1.0-beta.0" }
- "dependencies": { "react": "^15.3.0", "react-dom": "^15.3.0" }
After reading the Guide, I was able to produce this in my browser:
Initial Load of index.html after setting up webpack+react+babel

index.html after changing text in /src/components/App.js (HMR works)

Perhaps a couple of steps needed more clarification. I created a PR to update the Guide. Hopefully this helps.
You ran the HMR guide, because my PR with fixes has already been merged to the docs - sorry, I forgot to mention it here.
What were the fixes?
I have changed the required Webpack version.
I tried the guide again and ran into a small issue, and that was destructuring resolve from path in the webpack.config.js. const { resolve } = require('path')
I'm not sure which node version has destructuring, I'm running v4.6.1, but after changing it to a normal require statement everything seems to be working.