Skip to content

Commit

Permalink
FIX @storybook/addon-storyshots can read configuration from main.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Iiro Jäppinen committed Jan 21, 2020
1 parent e0a9a63 commit a98d907
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 a98d907

Please sign in to comment.