Skip to content

Commit d4e305f

Browse files
authored
Fix @storybook/addon-storyshots not being able to read config f… (#9577)
Fix @storybook/addon-storyshots not being able to read config from main.ts
2 parents 39a0a06 + a98d907 commit d4e305f

File tree

1 file changed

+4
-0
lines changed
  • addons/storyshots/storyshots-core/src/frameworks

1 file changed

+4
-0
lines changed

addons/storyshots/storyshots-core/src/frameworks/configure.ts

+4
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,11 @@ const getPreviewFile = (configDir: string): string | false => {
4545

4646
const getMainFile = (configDir: string): string | false => {
4747
const main = path.join(configDir, 'main.js');
48+
const mainTS = path.join(configDir, 'main.ts');
4849

50+
if (isFile(mainTS)) {
51+
return mainTS;
52+
}
4953
if (isFile(main)) {
5054
return main;
5155
}

0 commit comments

Comments
 (0)