2022-05-23 22:47:27 +08:00

50 lines
1.2 KiB
TypeScript

import type { StorybookConfig } from '@storybook/react/types';
const config: StorybookConfig = {
stories: [
{
directory: '../src/title',
titlePrefix: 'Custom Prefix',
},
{
directory: '../src',
titlePrefix: 'Demo',
files: '*.stories.(js|ts|tsx|mdx)',
},
{
directory: '../src/addon-docs',
files: '*.stories.mdx',
},
],
logLevel: 'debug',
addons: [
'@storybook/addon-essentials',
'@storybook/addon-storysource',
'@storybook/addon-storyshots',
'@storybook/addon-a11y',
],
typescript: {
check: true,
checkOptions: {},
reactDocgenTypescriptOptions: {
propFilter: (prop) => ['label', 'disabled'].includes(prop.name),
},
},
core: {
builder: { name: 'webpack4' },
channelOptions: { allowFunction: false, maxDepth: 10 },
disableTelemetry: true,
},
features: {
postcss: false,
// modernInlineRender: true,
storyStoreV7: !global.navigator?.userAgent?.match?.('jsdom'),
buildStoriesJson: true,
babelModeV7: true,
warnOnLegacyHierarchySeparator: false,
previewMdx2: true,
},
framework: '@storybook/react',
};
module.exports = config;