22 lines
653 B
TypeScript
22 lines
653 B
TypeScript
import { dirname, join } from 'path'
|
|
import type { StorybookConfig } from '@storybook/react-vite'
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../lib/**/*.mdx', '../lib/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
addons: [
|
|
getAbsolutePath('@storybook/addon-essentials'),
|
|
getAbsolutePath('@storybook/addon-interactions'),
|
|
getAbsolutePath('@storybook/addon-links'),
|
|
getAbsolutePath('@storybook/addon-themes'),
|
|
],
|
|
framework: {
|
|
name: getAbsolutePath('@storybook/react-vite'),
|
|
options: {},
|
|
},
|
|
}
|
|
export default config
|
|
|
|
function getAbsolutePath(value: string): any {
|
|
return dirname(require.resolve(join(value, 'package.json')))
|
|
}
|