Skip to content

Conversation

carwack
Copy link
Collaborator

@carwack carwack commented Mar 18, 2025

Add Storybook v8.6.7 in favor of Histoire for the Vue package.

As reply on: #3382 (comment)

Works with one workaround in .storybook/main.ts

 // TODO: fix this when vue-docgen accepts types from other packages in components
   // This is a workaround until vue-docgen-plugin is fixed since we also dont use autodocs
   // This removes the plugin vue-docgen-plugin so it wont load and throws an error on the use of an type import like
   // import { Avatar, type AvatarRootEmits, type AvatarRootProps } from '@ark-ui/vue/avatar'
   // using options: { docgen: "vue-component-meta",} throws other errors with node_modules/@zag-js/avatar/dist/index.mjs.vue' 
   // could not be found. This could be a fix for the vue-docgen-plugin error but it is not working for now
   viteFinal(config) {
     const vueDocgenIndex = config.plugins?.findIndex((plugin) => 
       plugin && typeof plugin === 'object' && 'name' in plugin && plugin.name === 'storybook:vue-docgen-plugin'
     ) ?? -1
     if (vueDocgenIndex !== -1) config.plugins?.splice(vueDocgenIndex, 1)
     return config
   }

carwack added 30 commits March 18, 2025 22:26
@segunadebayo
Copy link
Member

Thanks for this PR. I've been in doubt whether to accept this PR or not, given the amount of work that has gone into it.

I'm saying this because I know you can handle this. To prevent the sunk cost fallacy, I suggest we park this PR for now. The current Vue setup is sufficient for most use cases. I no longer see any added benefit in migrating to Storybook.

Sincerely apologize for leading us down this path.

@segunadebayo segunadebayo deleted the feat/add-vue-storybook branch September 1, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants