Skip to content

Commit

Permalink
fix: the shortcut fails to open browser when set the host (#13579)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea committed Jun 21, 2023
1 parent 4cc671f commit e0a48c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vite/src/node/server/index.ts
Expand Up @@ -435,7 +435,8 @@ export async function _createServer(
},
openBrowser() {
const options = server.config.server
const url = server.resolvedUrls?.local[0]
const url =
server.resolvedUrls?.local[0] ?? server.resolvedUrls?.network[0]
if (url) {
const path =
typeof options.open === 'string'
Expand Down

0 comments on commit e0a48c5

Please sign in to comment.