Description
Version
2.6.6
Reproduction link
https://github.com/srchulo/vue-cli3-proxy-error
Steps to reproduce
-
Go into public app and type "yarn serve".
-
Go into app/ and type "yarn serve"
-
Go to http://localhost:8080
-
Open the developer console.
-
Click "Go to App" link in the top right.
-
Observe the console (web socket connection closes before it is established, and failed requests show).
-
Make a change to app/, observe that hot reload will not occur.
What is expected?
Websockets should successfully be proxied to the Vue app on port 8081 and hot reload for the app on 8081 should work.
What is actually happening?
The websockets never connect, there are many failed requests, and hot reload does not work.
I did not have this issue when my project was on vue-cli2-- it was once I upgraded to vue-cli3 that I saw this issue.
These are some of the errors that I observe:
WebSocket connection to 'ws://localhost:8080/app/sockjs-node/946/btaua0jf/websocket' failed: WebSocket is closed before the connection is established.
POST http://localhost:8080/app/sockjs-node/946/2f03xsro/xhr_streaming?t=1554071918837 404 (Not Found)
GET http://localhost:8080/app/sockjs-node/946/a5xm1iat/eventsource 404 (Not Found)
GET http://localhost:8080/app/sockjs-node/139/crmbubvo/eventsource 404 (Not Found)