-
-
Notifications
You must be signed in to change notification settings - Fork 617
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(entry): fix a bug when --display-entrypoints=false
does not hide entries
#464
Conversation
Just out of curiosity, what was the value of |
bin/webpack.js
Outdated
@@ -357,7 +357,7 @@ For more information, see https://webpack.js.org/api/cli/.`); | |||
}); | |||
|
|||
ifArg("display-entrypoints", function(bool) { | |||
if (bool) outputOptions.entrypoints = true; | |||
outputOptions.entrypoints = !!bool; |
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.
Double boolean trick is enough to flip it correctly. Used it myself, but it might be some pitfalls, so might be better to do a strict equal instead if (bool === true)
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.
Yes, The trick is redundant。
The param:bool
is true or false anyhow!
Could we add a test? |
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!!
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 for your contributions. 🎉
Hi @sfger. Just a little hint from a friendly bot about the best practice when submitting pull requests:
You don't have to change it for this PR, just make sure to follow this hint the next time you submit a PR. |
@webpack-bot: |
--display-entrypoints=false
does not hide entries--display-entrypoints=false
does not hide entries
--display-entrypoints=false
does not hide entries--display-entrypoints=false
does not hide entries
--display-entrypoints=false
does not hide entries--display-entrypoints=false
does not hide entries
What kind of change does this PR introduce?
Fix bug: #463
Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
No
Summary
Fix bug: #463
Does this PR introduce a breaking change?
NO
Other information