mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-15 00:05:35 +08:00
`../base-dir/*/index.stories.jsx` will lead to `glob` being set to `*/index.stories.jsx` and so `glob.split('/').length` = 2. With the existing code the `recursive` flag would _not_ be set and yet webpack will need to recurse into the directories in order to find any `index.stories.jsx` files that might exist within them. Therefore, we should compare to 1 and not 2. See: https://github.com/storybookjs/storybook/issues/11530#issuecomment-662465689