<!-- Please don't delete this template otherwise your issue will be closed immediately --> <!-- Before creating an issue please make sure you are using the latest version of webpack. --> ### Bug report Setting Websocket Connection invoked twice <!-- Please ask questions on discussions, StackOverflow or the webpack Gitter. --> <!-- https://github.com/webpack/webpack/discussions --> <!-- https://stackoverflow.com/questions/ask?tags=webpack --> <!-- https://gitter.im/webpack/webpack --> <!-- Issues which contain questions or support requests will be closed. --> ### Actual Behavior <!-- Explain exactly how it behave --> invoked 2 request for setting websocket connection (see in Network Tab of DevTools ) <img width="600" alt="Webpack Template 2022-01-25 22-51-14" src="https://user-images.githubusercontent.com/4090779/151057743-f089fa64-dade-4df5-921e-41dbf14d769f.png"> ### Expected Behavior invoked 1 request for setting websocket connection <!-- "It should work" is not a helpful explanation --> <!-- Explain exactly how it should behave --> ### How Do We Reproduce? <!-- A great way to do this is to provide your configuration via a GitHub repository --> <!-- The most helpful is a minimal reproduction with instructions on how to reproduce --> <!-- Repositories with too many files or large `webpack.config.js` files are not suitable --> <!-- Please only add small code snippets directly into this issue --> <!-- https://gist.github.com is a good place for longer code snippets --> <!-- If your issue is caused by a plugin or loader, please create an issue on the loader/plugin repository instead --> [Repo for reproduce](https://github.com/rkovalyov/webpack-react-refresh) 1. `yarn` 2. `yarn start` ### Please paste the results of `npx webpack-cli info` here, and mention other relevant information