26 lines
474 B
TypeScript
26 lines
474 B
TypeScript
/**
|
|
* External dependencies
|
|
*/
|
|
import { registerBlockType } from '@wordpress/blocks';
|
|
import { isExperimentalBuild } from '@woocommerce/block-settings';
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
import metadata from './block.json';
|
|
import edit from './edit';
|
|
import save from './save';
|
|
import icon from './icon';
|
|
import './variations';
|
|
|
|
if ( isExperimentalBuild() ) {
|
|
registerBlockType( metadata, {
|
|
icon,
|
|
attributes: {
|
|
...metadata.attributes,
|
|
},
|
|
edit,
|
|
save,
|
|
} );
|
|
}
|