storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.08k stars 9.25k forks source link

Support `script setup` in Vue 3 #16231

Open arpadgabor opened 2 years ago

arpadgabor commented 2 years ago

Is your feature request related to a problem? Please describe

Vue 3 not long ago introduced official support for the script setup syntax that cleans up a lot of boilerplate in Vue components. Right now, with the latest beta, these components are not supported by @storybook/vue.

Describe the solution you'd like Support for script setup components.

Describe alternatives you've considered Write components normally with defineComponent but it becomes annoying.

Are you able to assist to bring the feature to reality? I don't think so.

Additional context

image

Logged the imported component. It appears as it is not imported correctly.

The default component generated by Storybook, converted to `script setup` ```vue ```
santiagoarizti commented 2 years ago

note: as of v4.44.1 vue-docgen-api (and vue-styleguidist) support <script setup> https://vue-styleguidist.github.io/docs/Documenting.html#setup-syntax https://github.com/vue-styleguidist/vue-styleguidist/releases/tag/v4.44.0

dLedda commented 2 years ago

Hi, this issue is blocking us from migrating our project to script setup, which we are ready to do. Has any progress been made?

mikestu commented 2 years ago

More info: It appears to also not work for Githubissues.

  • Githubissues is a development platform for aggregating issues.