-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
fix(serve): do not set port for modern client #2624
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2624 +/- ##
==========================================
+ Coverage 95.11% 95.23% +0.12%
==========================================
Files 31 31
Lines 1514 1512 -2
Branches 431 429 -2
==========================================
Hits 1440 1440
+ Misses 74 72 -2
Continue to review full report at Codecov.
|
packages/serve/src/startDevServer.ts
Outdated
const devServerFlags = require('webpack-dev-server/bin/cli-flags').devServer; | ||
|
||
const isModernClient = Boolean(devServerFlags.find((flag) => flag.name === 'client-web-socket-url')); | ||
|
||
options.port = await findPort(options.port); | ||
options.client = options.client || {}; |
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.
We move it under isModerClient
too
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.
Oh yes!
To be honestly I don't understand why we do it, if client port is not specified or |
It was my mistake here, we should not do it here, we should improve it on dev server, i.e. Difficult... |
What kind of change does this PR introduce?
fix
Did you add tests for your changes?
NA
If relevant, did you update the documentation?
NA
Summary
we removed
client.port
in webpack/webpack-dev-server#3181Refer webpack/webpack-dev-server#3181 (comment)
Does this PR introduce a breaking change?
No
Other information
No