Skip to content
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

add --inline-client command option #3381

Closed
wants to merge 2 commits into from
Closed

Conversation

elclanrs
Copy link

@elclanrs elclanrs commented Dec 4, 2016

This is a fix for issue #3361. This PR adds a new --inline-client option to customize Webpack's inline client URL that makes live reloading work. This is useful when your are using Vagrant or Docker and the client and host names and/or ports may differ. For example, inside Vagrant I may run ng serve on the default 4200 port and reverse proxy to port 80 which I expose in my host as port 1234. But angular-cli prints the wrong URL:

http://localhost:4200/sockjs-node/info?t=1480728685812

Producing this error:

[WDS] Disconnected!
GET http://localhost:4200/sockjs-node/info?t=1480728685812 net::ERR_CONNECTION_REFUSED

With this new option I can change it:

$ ng serve --inline-client http://localhost:1234

The above will use the right URL:

http://localhost:1234/sockjs-node/info?t=1480728685812

@elclanrs elclanrs changed the title add --inline-client command option to customize inline client url for livereload in webpack-dev-server add --inline-client command option Dec 4, 2016
name: 'inline-client',
type: String,
aliases: ['ic'],
description: '(Defaults to "http://host:port")'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add proper description on what it does please.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a description, any suggestions?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Websocket client URL for Webpack inline mode (Defaults to "http://host:port") sounds reasonable

@hansl
Copy link
Contributor

hansl commented Dec 19, 2016

Also please rebase your code with the latest master.

@aegyed91
Copy link

@elclanrs thx, this fixed my issue now i can do ng serve --inline-client https://projname.tsm.dev

this should be merged asap, until then i use npm link and keep merging in the latest master

@aegyed91
Copy link

aegyed91 commented Jan 3, 2017

@hansl Hi, is there any reason why this hasnt been merged?

I would happily rebase it with the latest master and resolve the conflict -the run method has been separated to serve.run.ts-, if you say u can merge it. If you can't merge it, can you please tell why?

@hansl
Copy link
Contributor

hansl commented Jan 10, 2017

Looks good, just need to rebase.

@filipesilva
Copy link
Contributor

@hansl as per #3873 (comment), #3952 appears to supersede this PR in a more elegant way, by fixing options that we already have but are not working currently.

@filipesilva
Copy link
Contributor

Closed in favor of #3952

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants