fix: 🐛 make dev server Storybook builds work again (#58188)

This commit is contained in:
Vadim Dalecky 2020-02-21 07:47:58 +01:00 committed by GitHub
parent 2121b8c1b2
commit cdda82ec14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();