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