Ensure we don't call configure for stories if we don't have any

This commit is contained in:
Tom Coleman 2021-09-13 21:48:27 +10:00
parent faf1b429c7
commit ebd1f934b8
2 changed files with 2 additions and 2 deletions

View File

@ -133,7 +133,7 @@ export default async (options: Options & Record<string, any>): Promise<Configura
);
entries.push(`${configFilename}-generated-config-entry.js`);
});
if (stories) {
if (stories.length > 0) {
const storyTemplate = await readTemplate(
path.join(__dirname, 'virtualModuleStory.template.js')
);

View File

@ -128,7 +128,7 @@ export default async (options: Options & Record<string, any>): Promise<Configura
);
entries.push(`${configFilename}-generated-config-entry.js`);
});
if (stories) {
if (stories.length > 0) {
const storyTemplate = await readTemplate(
path.join(__dirname, 'virtualModuleStory.template.js')
);