import { dirname, join } from 'path' module.exports = { stories: [ '../src/docs/**/*.mdx', '../src/components/**/*.mdx', '../src/components/**/*.stories.@(js|jsx|ts|tsx)', ], addons: [ getAbsolutePath('@storybook/addon-links'), getAbsolutePath('@storybook/addon-essentials'), ], framework: { name: getAbsolutePath('@storybook/react-vite'), options: {}, }, docs: { autodocs: true, }, } function getAbsolutePath(value: string): any { return dirname(require.resolve(join(value, 'package.json'))) }