30 lines
678 B
TypeScript
30 lines
678 B
TypeScript
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
import { dirname, join } from 'node:path';
|
|
|
|
const config: StorybookConfig = {
|
|
stories: ['../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
|
|
addons: [
|
|
getAbsolutePath('@storybook/addon-links'),
|
|
getAbsolutePath('@storybook/addon-webpack5-compiler-babel'),
|
|
getAbsolutePath('@storybook/addon-docs'),
|
|
],
|
|
|
|
framework: {
|
|
name: '@storybook/react-webpack5',
|
|
options: {},
|
|
},
|
|
|
|
staticDirs: ['../public'],
|
|
|
|
typescript: {
|
|
reactDocgen: 'react-docgen-typescript',
|
|
},
|
|
};
|
|
|
|
function getAbsolutePath(value) {
|
|
return dirname(require.resolve(join(value, 'package.json')));
|
|
}
|
|
|
|
export default config;
|