From a98d907b8210305e96d40a407e2320ce1cbc81bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iiro=20Ja=CC=88ppinen?= Date: Tue, 21 Jan 2020 09:07:10 +0200 Subject: [PATCH] FIX @storybook/addon-storyshots can read configuration from main.ts --- addons/storyshots/storyshots-core/src/frameworks/configure.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/storyshots/storyshots-core/src/frameworks/configure.ts b/addons/storyshots/storyshots-core/src/frameworks/configure.ts index fd2689eb27d2..f91b780bf598 100644 --- a/addons/storyshots/storyshots-core/src/frameworks/configure.ts +++ b/addons/storyshots/storyshots-core/src/frameworks/configure.ts @@ -45,7 +45,11 @@ const getPreviewFile = (configDir: string): string | false => { const getMainFile = (configDir: string): string | false => { const main = path.join(configDir, 'main.js'); + const mainTS = path.join(configDir, 'main.ts'); + if (isFile(mainTS)) { + return mainTS; + } if (isFile(main)) { return main; }