Skip to content

Commit

Permalink
fix: added missing storybook metro config
Browse files Browse the repository at this point in the history
  • Loading branch information
hristo87 committed Mar 19, 2024
1 parent be0c7da commit e967aec
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions baseProject/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ const defaultConfig = getDefaultConfig(__dirname);
let config = {};
{{#if hasStorybook}}

const storybookSourceExt =
process.env.STORYBOOK_ENABLED === 'true'
? ['storybook.tsx', 'storybook.ts', 'storybook.js', 'storybook.jsx']
: [];

if (process.env.STORYBOOK_ENABLED) {
defaultConfig.resolver.sourceExts = [...storybookSourceExt, ...defaultConfig.resolver.sourceExts];
}

generate({
configPath: path.resolve(__dirname, './.storybook'),
});
Expand Down

0 comments on commit e967aec

Please sign in to comment.