-
Notifications
You must be signed in to change notification settings - Fork 12k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack dev server with Vagrant forwarded port #3361
Comments
elclanrs
changed the title
Expose webpack's --public option to ng serve
Webpack dev server error with Vagrant forwarded port
Dec 3, 2016
elclanrs
changed the title
Webpack dev server error with Vagrant forwarded port
Webpack dev server with Vagrant forwarded port
Dec 3, 2016
asnowwolf
pushed a commit
to asnowwolf/angular-cli
that referenced
this issue
Apr 12, 2017
) This provides implementations for the following serve command options: live-reload [boolean; default: true] -- flag to control the browser live reload capability live-reload-client [URL; default: ssl/host/port command options] -- specify the URL that the live reload browser client will use Closes angular#3361
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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: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:
In order to get it working I need the following:
I found out the code that handles this in server-webpack.ts, line 38:
I need to hardcode
serveTaskOptions.port
to1234
make it work.I think Webpack's
--public
option may help, but it is not exposed tong 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?The text was updated successfully, but these errors were encountered: