Open LeMouf opened 1 month ago
I suspect this is a duplicate of https://github.com/storybookjs/storybook/issues/27178
Could you try with a some regular, none-Svelte CSF stories and see if it's still an issue?
it's look like a similar one but with regular none-Svelte CSF stories it work without any issue. it specificaly broke when i use an addon-svelte-csf one :/
i try the workaround describe in the link you provide without any success for the moment :(
Alright.
Could you create a repository with a minimal reproduction of the issue?
You can use https://storybook.new as a template
Sure, i have setup a repository and a package to reproduce the bug and illustrate the issue :
repo : https://github.com/LeMouf/nodemodule-svelte-csf
with 2 differents components stories, one classic csf, one with svelte csf both localy in the repo and in the package
Clone the repo
Edit the .npmrc file to setup your personnal authToken
run `npm run storybook`
=> the classic and the svelte csf work fine, for the package only the classic work fine not the svelte one :/
package : https://github.com/LeMouf/package-svelte-csf
Clone the repo
run `npm run storybook`
=> both classic and svelte work fine
Thanks for your help !
@JReinhold the repo suit your need to test it ?
Repro looks good. I don't know when I'll have time to look into it as I just had a kid that needs my attention.
Anyone is free to pick this up.
@JReinhold Congratulations on the arrival of your child, it's normal to prioritize it :) take care of the family
Describe the bug
Using
addon-svelte-csf
to create svelte stories, it work perfectly when they are in the src folder tree, but as soon as they are package ( exact same file ) and end up in the node_modules folder tree, it seems to lose something and end up to an errors :No primary story attached to this docs file, did you forget to use <Meta of={} />?
Steps to reproduce the behavior
add a package with component and stories using
addon-svelte-csf
add the same components + stories in a forlder in src file tree
configure the main.ts to use the stories of the src and the node_modules folders![image](https://github.com/storybookjs/addon-svelte-csf/assets/2346035/51c8c98e-3fd1-420f-ad04-3cb52aae4e31)
launch storybook, an see the src one working as expected and the node_modules reach an error ( cf: screenshot )
Expected behavior
Same Behavior for the two kind of usage, as for a classic stories this way of doing work without any issues
Environment