import type { StorybookConfig } from '@storybook/react-webpack5';

const storybookConfig: StorybookConfig = {
    stories: ['../src/**/*.mdx', '../src/**/*.stories.tsx'],
    addons: ['@storybook/addon-actions', '@storybook/addon-essentials', '@storybook/addon-queryparams'],
    staticDirs: ['../fonts'],
    framework: {
        name: '@storybook/react-webpack5',
        options: {
            builder: {
                useSWC: true,
            },
        },
    },
    docs: {
        autodocs: 'tag',
    },
    core: {
        disableTelemetry: true,
    },
    webpackFinal: async config => {
        config.watchOptions = {
            ignored: ['**/*.test.*'],
        };
        return config;
    },
    features: {
        storyStoreV7: true,
    },
};
export default storybookConfig;
