mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-05 05:51:21 +08:00
40 lines
1.0 KiB
Plaintext
40 lines
1.0 KiB
Plaintext
```ts
|
|
// .storybook/main.ts
|
|
|
|
// Imports the Storybook's configuration API
|
|
import type { StorybookConfig } from '@storybook/core-common';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
|
staticDirs: ['../public'],
|
|
addons: [
|
|
'@storybook/addon-links',
|
|
'@storybook/addon-essentials',
|
|
'@storybook/preset-create-react-app',
|
|
'@storybook/addon-interactions',
|
|
],
|
|
typescript: {
|
|
check: false,
|
|
checkOptions: {},
|
|
reactDocgen: 'react-docgen-typescript',
|
|
reactDocgenTypescriptOptions: {
|
|
shouldExtractLiteralValuesFromEnum: true,
|
|
propFilter: (prop) => (prop.parent ? !/node_modules/.test(prop.parent.fileName) : true),
|
|
},
|
|
},
|
|
framework: '@storybook/react',
|
|
core: {
|
|
builder: 'webpack4',
|
|
},
|
|
features: {
|
|
postcss: false,
|
|
},
|
|
refs: {
|
|
'design-system': {
|
|
title: 'Storybook Design System',
|
|
url: 'https://5ccbc373887ca40020446347-yldsqjoxzb.chromatic.com',
|
|
},
|
|
},
|
|
};
|
|
module.exports = config;
|
|
``` |