Load product grid styles in WP <=5.2 (https://github.com/woocommerce/woocommerce-blocks/pull/2000)
* Load product grid styles in WP <=5.2 * Explicitly exclude 'product-list-style' from default builds
This commit is contained in:
parent
f2b5448c66
commit
6df879a922
|
@ -115,6 +115,12 @@ const stableMainEntry = {
|
|||
'snackbar-notice-style':
|
||||
'./node_modules/wordpress-components/src/snackbar/style.scss',
|
||||
|
||||
// Styles for grid blocks. WP <=5.2 doesn't have the All Products block,
|
||||
// so this file would not be included if not explicitly declared here.
|
||||
// This file is excluded from the default build so CSS styles are included
|
||||
// in the other the components are imported.
|
||||
'product-list-style': './assets/js/base/components/product-list/style.scss',
|
||||
|
||||
// Blocks
|
||||
'handpicked-products': './assets/js/blocks/handpicked-products/index.js',
|
||||
'product-best-sellers': './assets/js/blocks/product-best-sellers/index.js',
|
||||
|
|
|
@ -108,7 +108,14 @@ const CoreConfig = {
|
|||
|
||||
const GutenbergBlocksConfig = {
|
||||
...baseConfig,
|
||||
...getMainConfig( { alias: getAlias() } ),
|
||||
...getMainConfig( {
|
||||
alias: getAlias(),
|
||||
// This file is already imported by the All Products dependencies,
|
||||
// so we can safely exclude it from the default build. It's still
|
||||
// needed in the legacy build because it doesn't include the
|
||||
// All Products block.
|
||||
exclude: [ 'product-list-style' ],
|
||||
} ),
|
||||
};
|
||||
|
||||
const BlocksFrontendConfig = {
|
||||
|
|
Loading…
Reference in New Issue