11import type { StorybookConfig } from '@storybook/web-components-vite' ;
2- import { join , dirname } from 'path' ;
3-
4- /**
5- * This function is used to resolve the absolute path of a package.
6- * It is needed in projects that use Yarn PnP or are set up within a monorepo.
7- */
8- function getAbsolutePath ( value : string ) : any {
9- return dirname ( require . resolve ( join ( value , 'package.json' ) ) ) ;
10- }
2+ import remarkGfm from 'remark-gfm' ;
113
124const config : StorybookConfig = {
135 stories : [
@@ -19,18 +11,30 @@ const config: StorybookConfig = {
1911 staticDirs : [ './images' ] ,
2012
2113 addons : [
22- getAbsolutePath ( '@storybook/addon-links' ) ,
23- getAbsolutePath ( '@storybook/addon-essentials' ) ,
24- getAbsolutePath ( '@chromatic-com/storybook' ) ,
25- getAbsolutePath ( '@storybook/addon-a11y' ) ,
14+ {
15+ name : '@storybook/addon-docs' ,
16+ options : {
17+ mdxPluginOptions : {
18+ mdxCompileOptions : {
19+ remarkPlugins : [ remarkGfm ] ,
20+ } ,
21+ } ,
22+ } ,
23+ } ,
24+ '@storybook/addon-links' ,
25+ '@storybook/addon-essentials' ,
26+ '@chromatic-com/storybook' ,
27+ '@storybook/addon-a11y' ,
2628 '../storyhelpers/storybook-readme' ,
2729 ] ,
2830
2931 framework : {
30- name : getAbsolutePath ( '@storybook/web-components-vite' ) ,
32+ name : '@storybook/web-components-vite' ,
3133 options : { } ,
3234 } ,
3335
34- docs : { } ,
36+ docs : {
37+ autodocs : true ,
38+ } ,
3539} ;
3640export default config ;
0 commit comments