Skip to content
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

Cannot find module error with stories: ['../**/*.stories.ts'] #56

Open
alcpereira opened this issue Jul 27, 2024 · 0 comments
Open

Cannot find module error with stories: ['../**/*.stories.ts'] #56

alcpereira opened this issue Jul 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@alcpereira
Copy link
Contributor

alcpereira commented Jul 27, 2024

How to reproduce

In sandboxes/react-18/.storybook/main.ts, change the following:

- stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
+ stories: ['../src/**/*.mdx', '../**/*.stories.@(js|jsx|mjs|ts|tsx)'],

I tried playing around, and here are some variations

# Normal setup
['../src/**/*.stories.ts']        # Works
['../**/*.stories.ts']            # Does not work
# With more than one folder
['../src/**/*.stories.ts', '../components/**/*.stories.ts'] # Works

I double checked (just mental sanity check) that the glob is correct:

❯ glob '../**/*.stories.ts'
../src/stories/ReExportButton.stories.ts
../src/stories/Page.stories.ts
../src/stories/Header.stories.ts
../src/stories/Button.stories.ts

It works with @storybook/react-vite and @storybook/react-webpack5

Version used

Tested with the current main (commit 63c89bc4f0fff2a45ba75c2161291f9c6f78b46e) and released version 0.10.0 of storybook-builder-rsbuild.

I'm using pnpm if that makes a difference too

@fi3ework fi3ework added the bug Something isn't working label Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants