@@ -92,6 +92,7 @@ module.exports = (api, options) => {
92
92
port ,
93
93
isAbsoluteUrl ( options . publicPath ) ? '/' : options . publicPath
94
94
)
95
+ const localUrlForBrowser = publicUrl || urls . localUrlForBrowser
95
96
96
97
const proxySettings = prepareProxy (
97
98
projectDevServerOptions . proxy ,
@@ -201,7 +202,7 @@ module.exports = (api, options) => {
201
202
let copied = ''
202
203
if ( isFirstCompile && args . copy ) {
203
204
try {
204
- require ( 'clipboardy' ) . writeSync ( urls . localUrlForBrowser )
205
+ require ( 'clipboardy' ) . writeSync ( localUrlForBrowser )
205
206
copied = chalk . dim ( '(copied to clipboard)' )
206
207
} catch ( _ ) {
207
208
/* catch exception if copy to clipboard isn't supported (e.g. WSL), see issue #3476 */
@@ -250,15 +251,15 @@ module.exports = (api, options) => {
250
251
const pageUri = ( projectDevServerOptions . openPage && typeof projectDevServerOptions . openPage === 'string' )
251
252
? projectDevServerOptions . openPage
252
253
: ''
253
- openBrowser ( urls . localUrlForBrowser + pageUri )
254
+ openBrowser ( localUrlForBrowser + pageUri )
254
255
}
255
256
256
257
// Send final app URL
257
258
if ( args . dashboard ) {
258
259
const ipc = new IpcMessenger ( )
259
260
ipc . send ( {
260
261
vueServe : {
261
- url : urls . localUrlForBrowser
262
+ url : localUrlForBrowser
262
263
}
263
264
} )
264
265
}
@@ -267,7 +268,7 @@ module.exports = (api, options) => {
267
268
// so other commands can do api.service.run('serve').then(...)
268
269
resolve ( {
269
270
server,
270
- url : urls . localUrlForBrowser
271
+ url : localUrlForBrowser
271
272
} )
272
273
} else if ( process . env . VUE_CLI_TEST ) {
273
274
// signal for test to check HMR
0 commit comments