Skip to content

Commit

Permalink
Bundle @wordpress/components to avoid styling incompatibilities (#571)
Browse files Browse the repository at this point in the history
Follows WooCommerce Admin's lead in bundling the @wordpress/components package and pinning to major version 8, rather than depending on the externally loaded instance. This avoids missing styles due to style overrides in WooCommerce Admin combined with changes in WP 5.4.
  • Loading branch information
Paul Dechov authored Apr 9, 2020
1 parent fbcd233 commit f7be0da
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ const webpackConfig = {
injectPolyfill: true,
requestToExternal( request ) {
switch ( request ) {
case '@wordpress/components':
return null;
case '@woocommerce/components':
return [ 'wc', 'components' ];
case '@woocommerce/currency':
Expand All @@ -68,6 +70,8 @@ const webpackConfig = {
},
requestToHandle( request ) {
switch ( request ) {
case '@wordpress/components':
return null;
case '@woocommerce/components':
return 'wc-components';
case '@woocommerce/currency':
Expand Down

0 comments on commit f7be0da

Please sign in to comment.