Can't use `nodemon` and `webpack-dev-server` at the same time. Server restarts
Author: MichaelBergquistSuarezCreated Apr 26, 2017Updated Nov 4, 2020
Type of issue:
bug?
Chapter:
03 and 04 (at least up to the React section)
If it's a bug:
Both nodemon and webpack-dev-server is watching for changes. When a change occur, both the server and webpack tries to reload. This causes webpack to not be able to reach the server, and the reload fails (no response).
How to reproduce:
- Run
npm start(oryarn start) - Run
npm run dev:wds(oryarn dev:wds) - Navigate to
localhost:8000 - Make a change in for example
src/client/index.jsx - Webpack will reload and the page will disappear in the browser since the reloaded page can't be found while the server is restarting
Surely I can't be the first to experience this?
Source: verekia/js-stack-from-scratch