A function which will gather the required storybook files.
Often, require strings need to be hard coded. Ours looked like this
constrequireFileCallback: RequireFileCallback = (fullFilePath) => { constreplaced = fullFilePath .replace("src/app/", "") .replace("src/common/", ""); // We have to give webpack a little bit to hook onto, so we remove // the module entrypoint and include that directly as a string to `require` if (fullFilePath.startsWith("src/app")) { returnrequire("app/" + replaced); } if (fullFilePath.startsWith("src/common")) { returnrequire("common/" + replaced); } return; };
A function which will gather the required storybook files. Often, require strings need to be hard coded. Ours looked like this