Skip to content

Commit d07f36a

Browse files
authored
fix: 🐛 make dev server Storybook builds work again (#58188) (#58220)
1 parent 6a65fe1 commit d07f36a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/kbn-storybook/index.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,17 @@ exports.runStorybookCli = config => {
6666
// storybook never completes, so neither will this promise
6767
const configDir = join(__dirname, 'storybook_config');
6868
log.debug('Config dir:', configDir);
69-
await storybook({
69+
70+
const config = {
7071
mode: flags.site ? 'static' : 'dev',
7172
port: 9001,
7273
configDir,
73-
outputDir: flags.site ? join(ASSET_DIR, name) : undefined,
74-
});
74+
};
75+
if (flags.site) {
76+
config.outputDir = join(ASSET_DIR, name);
77+
}
78+
79+
await storybook(config);
7580

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

0 commit comments

Comments
 (0)