title: Heroku React WebSocket connection failed
body: <p>I have a React app I made with create-react-app deployed on Heroku here <a href="http://www.morganecom.me/" rel="nofollow noreferrer">http://www.morganecom.me/</a>. Source here <a href="https://github.com/DavidMorgan92/ecom-client" rel="nofollow noreferrer">https://github.com/DavidMorgan92/ecom-client</a>.</p>
  <p>When the page loads there is an error in the console about a WebSocket connection failing. Console error stack trace:</p>
  <p><a href="https://i.stack.imgur.com/Bsvcw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Bsvcw.png" alt="enter image description here" /></a></p>
  <p>My app doesn't use web sockets directly, it seems to be something to do with webpack. I've tried searching for information but all I've found is people discussing the problem where they're using web sockets directly.</p>
  <p>Can anyone tell me why this is happening and what I can do about it?</p>