-
-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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]: Stories glob incorrectly matching test files #22300
Comments
I wasn't able to reproduce this in a basic (NextJS) sandbox. I have: stories: ['../stories/*.stories.@(js|jsx|ts|tsx)'],
webpackFinal(config) {
return { ...config, stats: { logging: 'info' } }
}, And: (With some intentional mistakes in
Notice Will look at the repro now. |
OK, I figured out the problem @noranda The issue stems from this line: We use special One workaround is to add @ndelangen I guess the user's babelrc settings must be applying to a) Somehow exclude that file from being processed by babel (i.e do the ignore list thing for them)? |
Excluding that path and adding our own loader for it seems the right move to me. Alternatively we could change the code to not need a loader at all. I'm not sure how hard that would be. |
I don't believe it needs a loader. It's simple custom JS we produce. |
I will believe #22239 is also related to the same glob issue. |
Yo-ho-ho!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.13 containing PR #22331 that references this issue. Upgrade today to the
|
Shiver me timbers!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.9 containing PR #22331 that references this issue. Upgrade today to the
|
Describe the bug
From Discord https://discord.com/channels/486522875931656193/1090840732945891328/1090840732945891328
I have a single stories.tsx file currently. If I include the story directly, all is well. If however, I switch to a wildcard glob (../src/components/**/*.stories.@(ts|tsx)), SB crashes because it's trying to include my *.test.tsx files, which are not *.stories.tsx. I tested the babel config and it's ignoring the test files.
Example error:
Version: 7.0.0-rc.10 using react-webpack5
Repo: https://github.com/ezcater/recipe/blob/nb/storybook-7-upgrade/packages/recipe/.storybook/main.ts#L37
To Reproduce
No response
System
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: