Skip to content

Commit

Permalink
fix: πŸ› make dev server Storybook builds work again (#58188) (#58220)
Browse files Browse the repository at this point in the history
  • Loading branch information
streamich authored Feb 21, 2020
1 parent 6a65fe1 commit d07f36a
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/kbn-storybook/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ exports.runStorybookCli = config => {
// storybook never completes, so neither will this promise
const configDir = join(__dirname, 'storybook_config');
log.debug('Config dir:', configDir);
await storybook({

const config = {
mode: flags.site ? 'static' : 'dev',
port: 9001,
configDir,
outputDir: flags.site ? join(ASSET_DIR, name) : undefined,
});
};
if (flags.site) {
config.outputDir = join(ASSET_DIR, name);
}

await storybook(config);

// Line is only reached when building the static version
if (flags.site) process.exit();
Expand Down

0 comments on commit d07f36a

Please sign in to comment.