1
0

main.ts 711 B

123456789101112131415161718
  1. import { StorybookConfig } from '@storybook/builder-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 directory
  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. }
  17. export default config