If you run a simple npx create-react-app my-app and then try to start it with WDS_SOCKET_PATH=/somethingelse npm start the fast refresh won't actually work. In fact, the WS never responds. The solution that worked to fix this was:
- First eject the app:
npm run eject
- Then edit the file
/config/webpackDevServer.config.js and add webSocketServer: { options: { path: sockPath } }, to the configuration.
If you run a simple
npx create-react-app my-appand then try to start it withWDS_SOCKET_PATH=/somethingelse npm startthe fast refresh won't actually work. In fact, the WS never responds. The solution that worked to fix this was:npm run eject/config/webpackDevServer.config.jsand addwebSocketServer: { options: { path: sockPath } },to the configuration.