2020-06-17 13:10:46 +00:00
|
|
|
/**
|
|
|
|
* External dependencies
|
|
|
|
*/
|
|
|
|
import { registerBlockComponent } from '@woocommerce/blocks-registry';
|
2020-07-14 11:35:15 +00:00
|
|
|
import { lazy } from '@wordpress/element';
|
|
|
|
import { WC_BLOCKS_BUILD_URL } from '@woocommerce/block-settings';
|
2020-06-17 13:10:46 +00:00
|
|
|
|
2020-07-14 11:35:15 +00:00
|
|
|
// Modify webpack publicPath at runtime based on location of WordPress Plugin.
|
|
|
|
// eslint-disable-next-line no-undef,camelcase
|
|
|
|
__webpack_public_path__ = WC_BLOCKS_BUILD_URL;
|
2020-06-17 13:10:46 +00:00
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-price',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/price" */ './product-elements/price/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-image',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/image" */ './product-elements/image/frontend'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-title',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/title" */ './product-elements/title/frontend'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-rating',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/rating" */ './product-elements/rating/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-button',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/button" */ './product-elements/button/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-summary',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/summary" */ './product-elements/summary/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-sale-badge',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/sale-badge" */ './product-elements/sale-badge/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-sku',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/sku" */ './product-elements/sku/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-category-list',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/category-list" */ './product-elements/category-list/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-tag-list',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/tag-list" */ './product-elements/tag-list/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-stock-indicator',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/stock-indicator" */ './product-elements/stock-indicator/block'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|
|
|
|
|
|
|
|
registerBlockComponent( {
|
|
|
|
blockName: 'woocommerce/product-add-to-cart',
|
2020-07-14 11:35:15 +00:00
|
|
|
component: lazy( () =>
|
|
|
|
import(
|
2020-07-22 12:20:54 +00:00
|
|
|
/* webpackChunkName: "atomic-block-components/add-to-cart" */ './product-elements/add-to-cart/frontend'
|
2020-07-14 11:35:15 +00:00
|
|
|
)
|
|
|
|
),
|
2020-06-17 13:10:46 +00:00
|
|
|
} );
|