-
Notifications
You must be signed in to change notification settings - Fork 797
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
Extensions: Fix webpack config #11967
Conversation
Caution: This PR has changes that must be merged to WordPress.com |
Thank you for the great PR description! When this PR is ready for review, please apply the Scheduled Jetpack release: April 29, 2019. |
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.
Nice catch; those definitions are used in so few places in blocks it's hard to catch without console logging what's going on.
Confirmed that CopyPlugin
appears at the bottom of the list and original webpackConfig.plugins
is intact.
Let's make sure to document this in docs (Automattic/wp-calypso#31679). Example from Gutenberg; https://github.com/WordPress/gutenberg/pull/14590/files
Turns out
_.merge()
causedCopyWebpackPlugin
to override the first item inwebpackConfig.plugins
(DefinePlugin
) 🙄Discovered while working on Automattic/wp-calypso#32083.
Changes proposed in this Pull Request:
Extensions: Fix webpack config by adding
CopyWebpackPlugin
through destructuring rather than_.merge()
.Testing instructions:
Verify that the above is true (e.g. by outputting the result of that
_.merge()
call on themaster
branch).Proposed changelog entry for your changes: