You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
just reads the file, extractStories expects preprocessed source. So if story uses typescript, storybook fails.
Steps to reproduce the behavior
Just try to use lang="ts" and a type in any stories.svelte file, when using svelte-webpack5.
Expected behavior
*.stories.svelte should also be preprocessed.
Additional context
I've tried to patch the loader to make it work, but it also requires modifying storybook's webpack config. I'm not sure what's the proper way to pass svelte-webpack5 options to the loader config by default here:
JReinhold
changed the title
[Bug] svelte-stories-loader doesn't preprocess stories
[Bug] svelte-stories-loader doesn't preprocess stories when using Webpack
May 13, 2024
Describe the bug
When using webpack5.
addon-svelte-csf/src/parser/svelte-stories-loader.ts
Line 47 in afad5de
extractStories
expects preprocessed source. So if story uses typescript, storybook fails.Steps to reproduce the behavior
Just try to use
lang="ts"
and a type in anystories.svelte
file, when usingsvelte-webpack5
.Expected behavior
*.stories.svelte
should also be preprocessed.Additional context
I've tried to patch the loader to make it work, but it also requires modifying storybook's webpack config. I'm not sure what's the proper way to pass
svelte-webpack5
options to the loader config by default here:addon-svelte-csf/src/preset/index.ts
Line 12 in afad5de
And here is what I ended up modifying:
The text was updated successfully, but these errors were encountered: