react-native-storybook-loader
react-native-storybook-loader copied to clipboard
Unable to resolve module '...' from 'storyLoader.js'
I think it is not react-native-storybook-loader's problem, but I think you may provide some information about this issue.
I put the .stories.js file under a __tests__ folder and refreshed the storyLoader.js generated by react-native-storybook-loader, then it shows an error:
I put the same file in a non-__tests__ folder and refreshed the storyLoader.js again, then it goes well.
// storyLoader.js
require('./../src/ofo_api/__tests__/API.stories.js'); // error
require('./../src/ofo_api//API.stories.js'); // good
I did not find any clue about this issue. Do you know why?
Sorry I haven't been able to look into this yet. I should be able to check out this and the other issue you logged this weekend.
It appears __tests__ folders are excluded by the React Native packager. It looks to be hard coded.
I also verified by creating a new React Native project and creating a component in a __tests__ folder and got the same error.
I suggest logging an issue/feature request on the React Native project (feel free to reference this issue so we can track progress). I do think this is a legitimate use case.
@xareelee, did you open an issue with the React Native team? If so, can you link it here?
Nope, I did not. I'm not sure how to describe this issue in the React Native repo.
How about that you report this issue there?
Ok, I will log one and link it.
@elderfo still have the issue. how did it go with the report?