This repository was archived by the owner on Feb 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -98,6 +98,13 @@ const getAlias = ( options = {} ) => {
9898const mainEntry = {
9999 // Shared blocks code
100100 blocks : './assets/js/index.js' ,
101+
102+ // Styles for grid blocks. WP <=5.2 doesn't have the All Products block,
103+ // so this file would not be included if not explicitly declared here.
104+ // This file is excluded from the default build so CSS styles are included
105+ // in the other the components are imported.
106+ 'product-list-style' : './assets/js/base/components/product-list/style.scss' ,
107+
101108 // Blocks
102109 'handpicked-products' : './assets/js/blocks/handpicked-products/index.js' ,
103110 'product-best-sellers' : './assets/js/blocks/product-best-sellers/index.js' ,
Original file line number Diff line number Diff line change @@ -83,7 +83,14 @@ const CoreConfig = {
8383
8484const GutenbergBlocksConfig = {
8585 ...baseConfig ,
86- ...getMainConfig ( { alias : getAlias ( ) } ) ,
86+ ...getMainConfig ( {
87+ alias : getAlias ( ) ,
88+ // This file is already imported by the All Products dependencies,
89+ // so we can safely exclude it from the default build. It's still
90+ // needed in the legacy build because it doesn't include the
91+ // All Products block.
92+ exclude : [ 'product-list-style' ] ,
93+ } ) ,
8794} ;
8895
8996const BlocksFrontendConfig = {
You can’t perform that action at this time.
0 commit comments