-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
/
main.ts
55 lines (54 loc) · 1.31 KB
/
main.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import type { StorybookConfig } from '@storybook/react-webpack5/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: {
channelOptions: { allowFunction: false, maxDepth: 10 },
disableTelemetry: true,
},
features: {
postcss: false,
storyStoreV7: !global.navigator?.userAgent?.match?.('jsdom'),
buildStoriesJson: true,
babelModeV7: true,
warnOnLegacyHierarchySeparator: false,
previewMdx2: true,
breakingChangesV7: true,
},
framework: '@storybook/react-webpack5',
// core: (c: any = {}) => {
// return {
// channelOptions: { allowFunction: false, maxDepth: 10 },
// disableTelemetry: true,
// ...c,
// };
// },
};
module.exports = config;