|
1 | 1 | import type { StorybookConfig } from '@storybook/react-webpack5'; |
| 2 | +import remarkGfm from 'remark-gfm'; |
| 3 | + |
2 | 4 | const config: StorybookConfig = { |
3 | 5 | stories: ['../stories/**/*.@(mdx|stories.@(ts|tsx))'], |
4 | 6 | staticDirs: ['./public'], |
5 | 7 |
|
6 | 8 | addons: [ |
7 | | - '@storybook/addon-essentials', |
8 | | - '@storybook/addon-mdx-gfm', |
9 | | - '@storybook/addon-storysource', |
10 | 9 | '@storybook/addon-webpack5-compiler-swc', |
11 | | - '@chromatic-com/storybook', |
12 | | - ], |
13 | | - swc: (config, options) => ({ |
14 | | - jsc: { |
15 | | - transform: { |
16 | | - react: { |
17 | | - runtime: 'automatic', |
| 10 | + { |
| 11 | + name: '@storybook/addon-docs', |
| 12 | + options: { |
| 13 | + mdxPluginOptions: { |
| 14 | + mdxCompileOptions: { |
| 15 | + remarkPlugins: [remarkGfm], |
| 16 | + }, |
18 | 17 | }, |
19 | 18 | }, |
20 | 19 | }, |
21 | | - }), |
22 | | - |
23 | | - webpackFinal: async (config, { configType }) => { |
24 | | - // Resolve error when webpack-ing storybook: |
25 | | - // Can't import the named export 'Children' from non EcmaScript module (only |
26 | | - // default export is available) |
27 | | - config.module?.rules?.push({ |
28 | | - test: /\.mjs$/, |
29 | | - include: /node_modules/, |
30 | | - type: 'javascript/auto', |
31 | | - }); |
32 | | - |
33 | | - return config; |
34 | | - }, |
35 | | - |
| 20 | + ], |
36 | 21 | framework: { |
37 | 22 | name: '@storybook/react-webpack5', |
38 | 23 | options: {}, |
|
0 commit comments