-
-
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
feat: add support for the new server
option
#3940
Conversation
bb9fe2c
to
59beb01
Compare
@@ -119,7 +119,6 @@ Options: | |||
--open-target-reset Clear all items provided in 'open.target' configuration. Opens specified page in browser. | |||
--open-app-name-reset Clear all items provided in 'open.app.name' configuration. Open specified browser. | |||
--port <value> Allows to specify a port to use. | |||
--server <value> Allows to set server and options (by default 'http'). |
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.
hm, why we remove it? We have --web-socket-server ws
, so I think --server http2
should work too, same for --server https
with auto generation for key/cert
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.
Otherwise, we have two similar flags --server-type <value>
and --server <value>
.
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.
for webSocketServer
we have only --web-socket-server
and not --web-socket-server-type
as the object options aren't cli firendly.
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.
hm, maybe you are right, we should check how webpack is doing the same for similar options (I think we already have the same cases in webpack), can you check?
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 will check.
Codecov Report
@@ Coverage Diff @@
## master #3940 +/- ##
==========================================
+ Coverage 92.58% 92.65% +0.07%
==========================================
Files 14 14
Lines 1362 1376 +14
Branches 474 486 +12
==========================================
+ Hits 1261 1275 +14
Misses 93 93
Partials 8 8
Continue to review full report at Codecov.
|
34f650f
to
de0af2a
Compare
@snitin315 ready for review? |
Yes |
@snitin315 Did you look how webpack handle enum and object for CLI options? |
I looked at webpack schema, but I was unable to find a similar case. |
I will review tomorrow |
…pack-dev-server (weaverryan) This PR was squashed before being merged into the main branch. Discussion ---------- Changing to support the "server" options object for webpack-dev-server Follow up to #1118 and solves #1119. The new `server` object has existed since `webpack-dev-server` 4.4 webpack/webpack-dev-server#3940, and we already require 4.8. Support for the old `https` kept for now (with deprecations) to help people migrate. Commits ------- e0fb0ad Changing to support the "server" options object for webpack-dev-server
For Bugs and Features; did you add new tests?
WIP on tests.
Motivation / Use-Case
Add support for the
server
option. More priority thanhttps
option.Breaking Changes
None
Additional Info
#3912 (comment)