Skip to content

feat: Add Storybook for the Vue package instead of Histoire #3396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 73 commits into
base: main
Choose a base branch
from

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 segunadebayo marked this pull request as draft May 18, 2025 22:43
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.

2 participants