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

Refactor defaulting #10401

Merged
merged 2 commits into from Feb 17, 2020
Merged

Refactor defaulting #10401

merged 2 commits into from Feb 17, 2020

Conversation

sokra
Copy link
Member

@sokra sokra commented Feb 17, 2020

Split options defaulting in normalization and defaults
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.

What kind of change does this PR introduce?
refactoring, feature

Did you add tests for your changes?
TODO

Does this PR introduce a breaking change?
yes

What needs to be documented once your changes are merged?
plugins may apply defaults to the configuration. Configuration is normalized before plugins are applied. Core defaults are applied after plugins has been applied.

cc @jantimon

@webpack-bot
Copy link
Contributor

webpack-bot commented Feb 17, 2020

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

@sokra sokra force-pushed the refactor/defaults branch 2 times, most recently from b730647 to 0f046a3 Compare February 17, 2020 15:04
Apply defaults after plugins are applied to allow plugins to feature their own defaults.
This allows to make preset plugins.
@webpack-bot
Copy link
Contributor

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@webpack-bot
Copy link
Contributor

I've created an issue to document this in webpack/webpack.js.org.

@jantimon
Copy link
Contributor

Wow that's really a cool idea 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants