Skip to content

Commit f9652a1

Browse files
Andy Parsonshaoqunjiang
Andy Parsons
authored andcommitted
fix(serve): respect devServer.openPage field (#2309)
1 parent ba15fa2 commit f9652a1

File tree

1 file changed

+4
-1
lines changed
  • packages/@vue/cli-service/lib/commands

1 file changed

+4
-1
lines changed

packages/@vue/cli-service/lib/commands/serve.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,10 @@ module.exports = (api, options) => {
242242
console.log()
243243

244244
if (args.open || projectDevServerOptions.open) {
245-
openBrowser(urls.localUrlForBrowser)
245+
const pageUri = ( projectDevServerOptions.openPage && typeof projectDevServerOptions.openPage === 'string' )
246+
? projectDevServerOptions.openPage
247+
: ''
248+
openBrowser(urls.localUrlForBrowser + pageUri)
246249
}
247250

248251
// Send final app URL

0 commit comments

Comments
 (0)