Skip to content

Commit

Permalink
Fix @storybook/addon-storyshots not being able to read config f… (#9577)
Browse files Browse the repository at this point in the history
Fix @storybook/addon-storyshots not being able to read config from main.ts
  • Loading branch information
shilman authored Feb 3, 2020
2 parents 39a0a06 + a98d907 commit d4e305f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions addons/storyshots/storyshots-core/src/frameworks/configure.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit d4e305f

Please sign in to comment.