Skip to content

Commit

Permalink
fix: shortcut open browser when set host (#13677)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea authored Jul 3, 2023
1 parent 8517645 commit 6f1c55e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/shortcuts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const BASE_PREVIEW_SHORTCUTS: CLIShortcut<PreviewServer>[] = [
key: 'o',
description: 'open in browser',
action(server) {
const url = server.resolvedUrls.local[0]
const url = server.resolvedUrls.local[0] ?? server.resolvedUrls.network[0]
openBrowser(url, true, server.config.logger)
},
},
Expand Down

0 comments on commit 6f1c55e

Please sign in to comment.