Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cli: fix watch options for array config #892
What kind of change does this PR introduce?
Did you add tests for your changes?
If relevant, did you update the documentation?
webpack/webpack#4594 points out that watch options aren't being honored when the
In the current implementation, when the Webpack compiler watch method is
I should also note that I don't have a ton of context into the intentions behind using the
webpack/webpack#4594 (not open, but still broken)
Does this PR introduce a breaking change?
It does not, this should be a seamless fallback in the case when the Webpack config is an array instead of an object that does the right thing when the CLI has watch-* flags.
@anshumanv per the CLA assistant page I have signed it (I did so as soon as I opened the PR), here's a screenshot of what I see when I visit the link from here (with my email obfuscated):
Any tips on what I can do to reset and re-sign so that it shows correctly are appreciated!
Issue #4594 points out that watch options aren't being honored when the Webpack config is an Array. In cases when it's an array, there may not be a firstOptions.watchOptions, but there will be an options.watchOptions. In the current implementation, when the Webpack compiler watch method is called with watchOptions and the Webpack config is an array, watchOptions will be `true` and not an object.