Original version had an issue with the following steps:
1) Run npm start at least once.
2) Make some changes in any React component files.
3) Run npm start again.
4) Open it in browser.
5) You'll see it loads changed code initially but refreshes back to code generated in Step 1
This issue was resolved by reordering express middleware so that static middleware is located below Webpack middlewares.
… using webpack + react + express
Original version had an issue with the following steps: 1) Run
npm start
at least once. 2) Make some changes in any React component files. 3) Runnpm start
again. 4) Open it in browser. 5) You'll see it loads changed code initially but refreshes back to code generated in Step 1This issue was resolved by reordering express middleware so that static middleware is located below Webpack middlewares.