-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Ensure --host option changes the network host #13521
Conversation
@@ -356,6 +356,13 @@ const startPreview = async ({ | |||
return { previewStats, previewTotalTime: process.hrtime(startTime) }; | |||
}; | |||
|
|||
export function getServerAddresses(port: number, host: string, proto: string) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this logic to its own function is useful for unit tests
@@ -414,7 +420,7 @@ export async function storybookDevServer(options: any) { | |||
]); | |||
|
|||
// TODO #13083 Remove this when compiling the preview is fast enough | |||
if (!options.ci) openInBrowser(address); | |||
if (!options.ci) openInBrowser(networkAddress); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@yannbf - I think it's the case now that we'll want the browser to open to networkAddress
, given that's what the user is configuring with the --host
option
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
CLI: Ensure --host option changes the network host
Issue: #12865
What I did
dev-server.test.ts
How to test
The test plan is defined in the issue