react-native-storybook-loader
react-native-storybook-loader copied to clipboard
Remove the requirement for generated files
See #10 for more discussion on this
It would be great to abstract this away from the user. But it is possible to do it dynamically with React Native bundler similar to webpack require.context
as mentioned here https://getstorybook.io/docs/react-storybook/basics/writing-stories ...
Related: https://github.com/storybooks/react-native-storybook/issues/103
@skovhus, do you have an example of how to configure webpack to do what is in the link? I originally tried that route and was unsuccessful, which is why I ended up writing this.
RN is not using webpack as bundler, so you cannot do this... I see now that my comment above didn't include a question. That was my intention. ; )
"But is it possible..."
At least this tool should always generate the file (storyLoader.js) even when there are no stories... currently It doesn't do anything when no stories are found, and this makes storybook.js fail because there is no storyLoader.js.. and also fails if there were stories and then I remove them, storyLoader.js does not get updated and fails at loading the stories