-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
fixed ipv6 ip parsing and listening at [::] #673
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,8 +272,21 @@ function processOptions(wpOpt) { | |
|
||
var protocol = options.https ? "https" : "http"; | ||
|
||
/** | ||
* the formated uri of the webpack server | ||
*/ | ||
var uri = url.format({ | ||
protocol: protocol, | ||
hostname: options.host, | ||
port: options.port.toString() | ||
}); | ||
|
||
if(options.inline !== false) { | ||
var devClient = [require.resolve("../client/") + "?" + protocol + "://" + (options.public || (options.host + ":" + options.port))]; | ||
/** | ||
* client query url public or formated uri | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above. |
||
*/ | ||
var query = options.public ? (protocol + "://" + options.public) : uri; | ||
var devClient = [require.resolve("../client/") + "?" + query]; | ||
|
||
if(options.hotOnly) | ||
devClient.push("webpack/hot/only-dev-server"); | ||
|
@@ -302,12 +315,8 @@ function processOptions(wpOpt) { | |
new Server(compiler, options).listen(options.port, options.host, function(err) { | ||
if(err) throw err; | ||
|
||
var uri = url.format({ | ||
protocol: protocol, | ||
hostname: options.host, | ||
port: options.port.toString(), | ||
pathname: options.inline !== false ? "/" : "webpack-dev-server/" | ||
}); | ||
//add the pathname of uri | ||
uri += options.inline !== false ? "/" : "webpack-dev-server/" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you make this a separate variable instead? It's hackish to override the variable in this case since in |
||
console.log(" " + uri); | ||
|
||
console.log("webpack result is served from " + options.publicPath); | ||
|
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.
Can you remove this comment or make it more descriptive? Atm this tells me nothing more then I already know from looking at the code.
If you make it more descriptive, be sure to use
//
instead.