1
0

main.ts 750 B

123456789101112131415161718192021
  1. import { StorybookConfig } from '@storybook/react-vite'
  2. const config: StorybookConfig = {
  3. stories: ['../src/**/*.stories.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
  4. addons: ['@storybook/addon-links', '@storybook/addon-essentials'],
  5. framework: '@storybook/react-vite',
  6. viteFinal: (config) => {
  7. return {
  8. ...config,
  9. // override .env directorya jesl
  10. envDir: 'src',
  11. // get rid of checker plugin since it references .eslintignore at relative path, and we don't need it in storybook anyway
  12. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  13. plugins: config.plugins.filter((p) => (p as any).name !== 'vite-plugin-checker'),
  14. }
  15. },
  16. docs: {
  17. autodocs: true,
  18. },
  19. }
  20. export default config