11import type { StorybookConfig } from '@storybook/nextjs' ;
2+ import path from 'path' ;
23
34const config : StorybookConfig = {
45 stories : [ '../components/**/*.stories.tsx' ] ,
@@ -8,6 +9,22 @@ const config: StorybookConfig = {
89 docs : { autodocs : 'tag' } ,
910 staticDirs : [ '../public' ] ,
1011 core : { disableTelemetry : true } ,
12+ webpackFinal : async ( config : any , { configType } ) => {
13+ config . resolve . modules = [ path . resolve ( __dirname , '..' ) , 'node_modules' ] ;
14+
15+ config . resolve . alias = {
16+ ...config . resolve . alias ,
17+ '@/components' : path . resolve ( __dirname , '../components' ) ,
18+ '@/util' : path . resolve ( __dirname , '../util' ) ,
19+ '@/hooks' : path . resolve ( __dirname , '../hooks' ) ,
20+ '@/navigation.json' : path . resolve ( __dirname , '../navigation.json' ) ,
21+ '@/providers' : path . resolve ( __dirname , '../providers' ) ,
22+ '@/next.locales.mjs' : path . resolve ( __dirname , '../next.locales.mjs' ) ,
23+ '@/next.json.mjs' : path . resolve ( __dirname , '../next.json.mjs' ) ,
24+ } ;
25+
26+ return config ;
27+ } ,
1128} ;
1229
1330export default config ;
0 commit comments