We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17e80be commit 81faeacCopy full SHA for 81faeac
packages/core/src/server/open.ts
@@ -139,6 +139,7 @@ export async function open({
139
clearCache?: boolean;
140
}): Promise<void> {
141
const { targets, before } = normalizeOpenConfig(config);
142
+ const host = config.server.host || 'localhost';
143
144
// Skip open in codesandbox. After being bundled, the `open` package will
145
// try to call system xdg-open, which will cause an error on codesandbox.
@@ -154,7 +155,7 @@ export async function open({
154
155
156
const urls: string[] = [];
157
const protocol = https ? 'https' : 'http';
- const baseUrl = `${protocol}://localhost:${port}`;
158
+ const baseUrl = `${protocol}://${host}:${port}`;
159
160
if (!targets.length) {
161
if (routes.length) {
0 commit comments