Skip to content
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

chore: remove --mode flag validation #1744

Merged
merged 3 commits into from
Aug 17, 2020
Merged

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?
chore

Did you add tests for your changes?
YES
If relevant, did you update the documentation?
NA
Summary
webpack already validates the config. No need to do double work.

Does this PR introduce a breaking change?
NO

Other information

@snitin315 snitin315 requested a review from a team as a code owner August 14, 2020 09:21
if (this.args.mode !== PRODUCTION && this.args.mode !== DEVELOPMENT && this.args.mode !== NONE) {
logger.warn('You provided an invalid value for "mode" option. Using "production" by default');
return PRODUCTION;
}
return this.args.mode;
}
return PRODUCTION;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We even simplify - just set mode only when it passed, webpack itself set production by default

@alexander-akait alexander-akait merged commit 51d27c6 into next Aug 17, 2020
@alexander-akait alexander-akait deleted the chore/mode-validation branch August 17, 2020 11:33
@snitin315 snitin315 added this to Done (Phase 3) in GSoC 2020 Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
GSoC 2020
  
Done (Phase 3)
Development

Successfully merging this pull request may close these issues.

None yet

4 participants