Skip to content

Commit

Permalink
open browser after manager is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Nov 29, 2022
1 parent 4ff17a7 commit 663138a
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 663138a

Please sign in to comment.