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

Extensions: Fix webpack config #11967

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Apr 8, 2019

Turns out _.merge() caused CopyWebpackPlugin to override the first item in webpackConfig.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:

yarn distclean && yarn ci
yarn build-extensions

Verify that the above is true (e.g. by outputting the result of that _.merge() call on the master branch).

Proposed changelog entry for your changes:

  • N/A

@ockham ockham added [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. [Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack labels Apr 8, 2019
@ockham ockham self-assigned this Apr 8, 2019
@ockham ockham requested review from a team April 8, 2019 12:08
@matticbot
Copy link
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello ockham! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer, review, and approve D26610-code before merging this PR. Thank you!

@jetpackbot
Copy link

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Scheduled Jetpack release: April 29, 2019.
Scheduled code freeze: April 22, 2019

Generated by 🚫 dangerJS against fd165a7

Copy link
Member

@simison simison left a 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

ockham added a commit to Automattic/newspack-blocks that referenced this pull request Apr 8, 2019
@kraftbj kraftbj added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review To request a review from fellow Jetpack developers. Label will be renamed soon. labels Apr 8, 2019
@sirreal sirreal merged commit 9ef4f37 into master Apr 9, 2019
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Apr 9, 2019
@sirreal sirreal deleted the fix/extensions-webpack-config branch April 9, 2019 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Blocks Issues related to the block editor, aka Gutenberg, and its extensions developed in Jetpack Touches WP.com Files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants