histoire.config.ts 902 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. // Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. import { defineConfig } from 'histoire'
  3. import { HstVue } from '@histoire/plugin-vue'
  4. export default defineConfig({
  5. setupFile: './app/frontend/stories/support/setupHistoire.ts',
  6. storyMatch: ['app/frontend/**/*.story.vue'],
  7. plugins: [HstVue()],
  8. vite: {
  9. server: {
  10. port: 3074,
  11. ...(process.env.HISTOIRE_BUILD && {
  12. hmr: false,
  13. watch: { ignored: ['**/*'] },
  14. }),
  15. },
  16. logLevel: process.env.HISTOIRE_BUILD ? 'error' : 'info',
  17. },
  18. tree: {
  19. groups: [
  20. {
  21. id: 'common',
  22. title: 'Common',
  23. include: (file) => file.title.startsWith('Common'),
  24. },
  25. {
  26. id: 'modules',
  27. title: 'Modules',
  28. },
  29. {
  30. id: 'form',
  31. title: 'Form',
  32. include: (file) => file.title.startsWith('Field'),
  33. },
  34. ],
  35. },
  36. })