Description
openedon May 23, 2018
Thank you for the excellent job you are doing with Storybook. I am implementing a project in using Storybook as a platform to run automated tests. I want to move the .storybook\config.js to a different path for example C:\StorybookConfigFile\src\application\storybook.storybook\config.js
Is it possible to move the config.js file located on C:\user\app-storybook.storybook to a path such as
C:\StorybookConfigFile\src\application\storybook.storybook\config.js
What need to be changed in the config.js file so the stories still be loaded?
// Loading stories dynamically - automatically import all files ending in *.stories.js
const req = require.context('../src', true, /.stories.js$/)
function loadStories() {
req.keys().forEach((filename) => req(filename))
}
configure(loadStories, module);