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: allow falsy values for "port" option #2962
Conversation
webpack-dev-server@3 allows using `null` or `0` to automatically use a free port.
|
Please accept CLA, also I want to note - please prefer to use |
Thank you @alexander-akait. I will make a note of that for when we upgrade to v4. |
Codecov Report
@@ Coverage Diff @@
## master #2962 +/- ##
=======================================
Coverage 95.13% 95.13%
=======================================
Files 31 31
Lines 1684 1685 +1
Branches 483 483
=======================================
+ Hits 1602 1603 +1
Misses 82 82
Continue to review full report at Codecov.
|
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.
LGTM
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.
Thanks!
What kind of change does this PR introduce?
Fix
Did you add tests for your changes?
Open to suggestions for testing this.
If relevant, did you update the documentation?
N/A
Summary
This fixes a regression that we noticed when updating to
webpack-cli@4.7.2
. We are still onwebpack-dev-server@3.11.2
which allows usingnull
or0
to automatically use a free port. In our case we are settingport: 0
and it was causing this error:If
webpack-cli
still supportswebpack-dev-server@3.11.2
it seems like it shouldn't prevent passingnull
or0
as an option toport
. Our current workaround is using the string'0'
, which is not falsy.Does this PR introduce a breaking change?
No
Other information