-
Notifications
You must be signed in to change notification settings - Fork 32
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
[Bug] JSDoc description disappears with lang="ts"
#175
Comments
Storybook has a Vite plugin that extracts the JSDoc comments and puts them on https://github.com/storybookjs/storybook/blob/next/code/lib/csf-tools/src/enrichCsf.ts/#L135-L140 I suspect what's happening here is that the Svelte CSF Vite plugin is added after the CSF plugin, meaning that it will first extract comments from all |
I think I'm wrong here, there's plenty of code in this addon to handle this specifically, so this should work actually. |
I actually have this working fine with the example from https://github.com/storybookjs/addon-svelte-csf/blob/main/stories/metaexport.stories.svelte See https://stackblitz.com/~/edit/github-5qdaww Can you provide a minimal reproduction? It doesn't work with HMR, maybe that threw you off? |
It seems like adding I'm not even using any types in the code, just the lang tag. But I think that should narrow it down a lot. |
lang="ts"
I am not sure what the heck happened. Upgrading Or in the Chromatic preview - the story uses |
I'm not sure either, but I don't think the "fix" is propagated to user projects. I tried upgrading my reproduction to the canary from that branch, and it still doesn't show JSDocs when https://stackblitz.com/~/edit/github-5qdaww?file=src/stories/Batton.stories.svelte |
According to the documentation, to set the description of a component you should use a JSDoc comment above the
meta
variable or above the component. The first variant does not work and the second one doesn't make sense (what is "above" a Svelte component)?The only variant remaining is to set the string manually in meta like so:
The text was updated successfully, but these errors were encountered: