You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Webpack dev server with Vagrant forwarded port #3361
macOS El Capitan
angular-cli: 1.0.0-beta.21
node: 6.9.1
os: darwin x64
I'm running ng serve within a Vagrant box. I configured Nginx following these instructions. Everything works as expected when I forward port 4200 in Vagrant, but it fails with any other port, with this error:
[WDS] Disconnected!
GET http://localhost:4200/sockjs-node/info?t=1480728685812 net::ERR_CONNECTION_REFUSED
I understand why this happens, it's because in the guest I reverse proxy port 4200 to port 80 which is exposed as port 1234 in the host, like:
I need to hardcode serveTaskOptions.port to 1234 make it work.
I think Webpack's --public option may help, but it is not exposed to ng serve. Any ideas how to get this working without the hack? Perhaps exposing a different port option for port forwarding, since the guest port where webpack is running may not be the same port in the host?
Activity
[-]Expose webpack's --public option to ng serve[/-][+]Webpack dev server error with Vagrant forwarded port[/+][-]Webpack dev server error with Vagrant forwarded port[/-][+]Webpack dev server with Vagrant forwarded port[/+]fix(serve): allow relevant live-reload options to function (angular#4744
angular-automatic-lock-bot commentedon Sep 6, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.
fix(serve): allow relevant live-reload options to function (angular#4744