const webpackOverride = require( '../webpack.config' );
const staticDirs = [
{
from: '../../../plugins/woocommerce-admin/client',
to: 'main/plugins/woocommerce-admin/client',
},
];
if ( process.env.NODE_ENV && process.env.NODE_ENV === 'production' ) {
// Add WooCommerce Blocks Storybook for build process.
staticDirs.push( {
from: '../../../plugins/woocommerce-blocks/storybook/dist',
to: '/assets/woocommerce-blocks',
} );
}
module.exports = {
stories: [
// WooCommerce Admin / @woocommerce/components components
'../../../packages/js/components/src/**/stories/*.story.@(js|tsx)',
// WooCommerce Admin / @woocommerce/experimental components
'../../../packages/js/experimental/src/**/stories/*.story.@(js|tsx)',
// WooCommerce Admin / @woocommerce/onboarding components
'../../../packages/js/onboarding/src/**/stories/*.story.@(js|tsx)',
'../../../packages/js/product-editor/src/**/*.(stories|story).@(js|tsx)',
'../../../plugins/woocommerce-admin/client/**/stories/*.story.@(js|tsx)',
],
refs: ( config, { configType } ) => {
if ( configType === 'DEVELOPMENT' ) {
return {};
}
return {
'woocommerce-blocks': {
expanded: false,
title: 'WooCommerce Blocks',
url: '/assets/woocommerce-blocks',
},
};
},
addons: [
'@storybook/addon-docs',
'@storybook/addon-controls',
// This package has been deprecated, in favor of @storybook/addon-controls
// However, it is still needed for the