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

Clone optimization config in Defaulter #7063

Merged
merged 1 commit into from
Apr 17, 2018
Merged

Conversation

sokra
Copy link
Member

@sokra sokra commented Apr 17, 2018

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
yes

If relevant, link to documentation update:
N/A

Summary
we forgot to clone the optimization config in the Defaulter

Does this PR introduce a breaking change?
no

Other information
problem found in #6565

@@ -193,6 +193,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
options => (isProductionLikeMode(options) ? "warning" : false)
);

this.set("optimization", "call", value => Object.assign({}, value));
Copy link
Member

Choose a reason for hiding this comment

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

Why does this one need Object.assign({}, value) instead of just defaulting to {} like its subkeys? Or is that something that is needed only on all top-level objects?

Copy link
Member Author

Choose a reason for hiding this comment

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

Or is that something that is needed only on all top-level objects?

Yep, it basically clones all modified objects

@webpack-bot
Copy link
Contributor

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

@sokra sokra merged commit 941be29 into master Apr 17, 2018
@sokra sokra deleted the bugfix/clone-optimization branch April 17, 2018 16:17
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