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: support both webpack versions #1065
Conversation
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.
Looks good to me, haven't tried to run it
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.
Code wise looks good. I would move it into a separate a function so we can test it
bin/utils/convert-argv.js
Outdated
const error = new WebpackOptionsValidationError(webpackConfigurationValidationErrors); | ||
console.error(error.message, `\nReceived: ${typeof options} : ${JSON.stringify(options, null, 2)}`); | ||
process.exit(-1); // eslint-disable-line | ||
let error; |
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.
Could you make a function out of it and export it? So we can test it and make sure 100% that it works.
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.
yup will do
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
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 should add the test now
@evenstensberg Thanks for your update. I labeled the Pull Request so reviewers will review it again. @ematipico Please review the new changes. |
Thanks for reviewing @ematipico . Singing this of and releasing 💙 |
What kind of change does this PR introduce?
#1023
Did you add tests for your changes?
Yes
If relevant, did you update the documentation?
N/A
Summary
Tries to resolve validation for both versions.
Does this PR introduce a breaking change?
no
Other information
@sokra could you verify? Tested locally, removed the
if/else
but you might be aware of anymore pitfalls.