import { dirname, join } from 'path' module.exports = { stories: [ '../src/components/**/*.stories.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'))) }