2024-03-13 16:21:18 +03:00
|
|
|
import { StorybookConfig } from '@storybook/react-vite';
|
2024-08-20 12:05:13 +03:00
|
|
|
import * as path from 'path';
|
|
|
|
import checker from 'vite-plugin-checker';
|
2024-03-13 16:21:18 +03:00
|
|
|
|
|
|
|
const config: StorybookConfig = {
|
|
|
|
stories: ['../src/**/*.stories.@(js|jsx|ts|tsx|mdx)'],
|
|
|
|
addons: [
|
2024-04-04 13:30:49 +03:00
|
|
|
'@storybook/addon-links',
|
2024-03-13 16:21:18 +03:00
|
|
|
'@storybook/addon-essentials',
|
2024-04-04 13:30:49 +03:00
|
|
|
'@storybook/addon-onboarding',
|
2024-03-13 16:21:18 +03:00
|
|
|
'@storybook/addon-interactions',
|
2024-04-04 13:30:49 +03:00
|
|
|
'@storybook/addon-coverage',
|
2024-04-11 18:28:12 +03:00
|
|
|
'storybook-dark-mode',
|
2024-04-04 13:30:49 +03:00
|
|
|
'storybook-addon-cookie',
|
|
|
|
'storybook-addon-pseudo-states',
|
2024-03-13 16:21:18 +03:00
|
|
|
],
|
|
|
|
framework: {
|
|
|
|
name: '@storybook/react-vite',
|
2024-04-04 13:30:49 +03:00
|
|
|
options: {},
|
2024-03-13 16:21:18 +03:00
|
|
|
},
|
2024-08-20 12:05:13 +03:00
|
|
|
viteFinal: (config) => {
|
|
|
|
return {
|
|
|
|
...config,
|
|
|
|
plugins: [
|
|
|
|
...(config.plugins ?? []),
|
|
|
|
checker({
|
|
|
|
typescript: {
|
|
|
|
tsconfigPath: path.resolve(__dirname, '../tsconfig.dev.json'),
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
],
|
|
|
|
};
|
|
|
|
},
|
2024-03-13 16:21:18 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
export default config;
|
|
|
|
|
|
|
|
// To customize your Vite configuration you can use the viteFinal field.
|
|
|
|
// Check https://storybook.js.org/docs/react/builders/vite#configuration
|
|
|
|
// and https://nx.dev/recipes/storybook/custom-builder-configs
|