-
-
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
Added sockHost, changed how sock URL is built #1858
Changes from 2 commits
90c3bb2
836f2bf
c7a3c04
943a8c0
3534267
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 |
---|---|---|
|
@@ -288,6 +288,16 @@ | |
"setup": { | ||
"instanceof": "Function" | ||
}, | ||
"sockHost": { | ||
"anyOf": [ | ||
{ | ||
"type": "string" | ||
}, | ||
{ | ||
"type": "null" | ||
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. I think we don't have to write explicitly. 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. You mean the 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. Yes, we discussed here, and I also don't think it's necessary. |
||
} | ||
] | ||
}, | ||
"sockPath": { | ||
"type": "string" | ||
}, | ||
|
@@ -395,8 +405,9 @@ | |
"serveIndex": "should be {Boolean} (https://webpack.js.org/configuration/dev-server/#devserverserveindex)", | ||
"serverSideRender": "should be {Boolean} (https://github.com/webpack/webpack-dev-middleware#serversiderender)", | ||
"setup": "should be {Function} (https://webpack.js.org/configuration/dev-server/#devserversetup)", | ||
"sockHost": "should be {String|Null} (https://webpack.js.org/configuration/dev-server/#devserversockhost)", | ||
"sockPath": "should be {String} (https://webpack.js.org/configuration/dev-server/#devserversockpath)", | ||
"sockPort": "should be {Number|String|Null}", | ||
"sockPort": "should be {Number|String|Null} (https://webpack.js.org/configuration/dev-server/#devserversockport)", | ||
"socket": "should be {String} (https://webpack.js.org/configuration/dev-server/#devserversocket)", | ||
"staticOptions": "should be {Object} (https://webpack.js.org/configuration/dev-server/#devserverstaticoptions)", | ||
"stats": "should be {Object|Boolean} (https://webpack.js.org/configuration/dev-server/#devserverstats-)", | ||
|
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.
Please use strict equality operator. Or are you intentionally doing so to include
undefined
?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.
That's how it was here: https://github.com/webpack/webpack-dev-server/blob/master/client-src/default/index.js#L235. I kept it that way under the assumption that it might need to catch
undefined
.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.
I see. I didn't know that it was already used...
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.
@Loonride i think we should fix using
!= (
==` and etc) in our code baseThere 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.
@evilebottnawi should I fix it here?
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.
I want to change
!==
, but its change is the breaking change, so please rewrite as below.if ((urlParts.path !== null || urlParts.path !== undefined) && urlParts.path !== '/') {
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.
I think
urlParts.path != null
would turn into(urlParts.path !== null && urlParts.path !== undefined)
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.
You're right. My mistake.