-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Global decorators do not seem to be working for SvelteKit #18749
Comments
As a workaround, the solution I found was defining the decorator in
and with some props
|
Still an issue.
Decorators will render but the children (story component) does not. |
Can anyone confirm whether this is still a problem in the latest 7.0 betas? |
I was trying to test this in my template project, but after updating to SvelteKit 1.0 it started giving out this error - storybookjs/builder-vite#532. I later tried out with storybook v7.0.0-beta.16 and addon-svelte-csf@v3.0.0-next.3 and I can't run the command start-storybook (says command not found). Am I missing something? My package.json using 7.0 beta |
@BeeMargarida there has been a change to the binary used to run storybook. You can use |
@IanVS Thank you, that was it! It's working now with the decorator setup mentioned in the documentation.
|
We got rid of that warning a while back. Are you sure that you're using the latest beta version of |
I actually didn't even have it as a dependency, just had this in
I added it just to test (with the same versions as the other storybook packages) and the warning remains. Here's the link to the current setup I have |
Nevermind, I found the warning. I'll update it, but for now you can safely ignore it, it has no impact. PR to remove the warning: #20442 Thanks for the heads-up. |
Thank you! 🙌 |
Closing this since #20442 was merged |
Describe the bug
The logic documented in the Decorators docs for SvelteKit - https://storybook.js.org/docs/svelte/writing-stories/decorators#global-decorators - does not seem to be working.
To Reproduce
I made a repo with a reproduction - https://github.com/BeeMargarida/svelte-storybook-template.
Steps:
npm install
npm run storybook
I made the global decorator something like
and in
preview.js
I added the lineexport const decorators = [() => Decorator];
. But the script tag is not run and theGLOBAL HEADER
does not appear. I checked and the decorators arrow function is executed.System
The text was updated successfully, but these errors were encountered: