Skip to content

Commit

Permalink
Merge pull request #20005 from storybookjs/norbert/sb-1022-sb19968-bu…
Browse files Browse the repository at this point in the history
…g-cannot-get-when-starting

Core: Open browser after manager is ready
  • Loading branch information
shilman authored Nov 30, 2022
2 parents 4eb9971 + 663138a commit afcd26c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions code/lib/core-server/src/dev-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,6 @@ export async function storybookDevServer(options: Options) {
logConfig('Preview webpack config', await previewBuilder.getConfig(options));
}

Promise.all([initializedStoryIndexGenerator, listening, usingStatics]).then(async () => {
if (!options.ci && !options.smokeTest && options.open) {
openInBrowser(host ? networkAddress : address);
}
});

const managerResult = await managerBuilder.start({
startTime: process.hrtime(),
options,
Expand All @@ -121,6 +115,12 @@ export async function storybookDevServer(options: Options) {
channel: serverChannel,
});

Promise.all([initializedStoryIndexGenerator, listening, usingStatics]).then(async () => {
if (!options.ci && !options.smokeTest && options.open) {
openInBrowser(host ? networkAddress : address);
}
});

let previewResult;

if (!options.ignorePreview) {
Expand Down

0 comments on commit afcd26c

Please sign in to comment.