-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Set dev server listen host and port via environment variables #793
Conversation
If we're going to support |
@@ -21,11 +21,11 @@ def hot_module_replacing? | |||
end | |||
|
|||
def host | |||
fetch(:host) | |||
ENV["WEBPACK_DEV_SERVER_LISTEN_HOST"] || fetch(:host) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These should all match their method names, e.g. ENV["WEBPACK_DEV_SERVER_HOST"]
Yepp and may be best to get rid of |
Yeah, I'd like to drop --- a/lib/webpacker/dev_server.rb
+++ b/lib/webpacker/dev_server.rb
@@ -42,7 +42,7 @@ class Webpacker::DevServer
private
def fetch(key)
- config.dev_server.fetch(key, defaults[key])
+ ENV["WEBPACK_DEV_SERVER_#{key.upcase}"] || config.dev_server.fetch(key, defaults[key])
end |
Yepp looks great 👍 |
And in binstub we can take all |
@monai This involves a few more changes so I am going to make another PR that covers everything 👍 |
Closing in favour of #843 |
Resolve #767.