@@ -337,6 +337,7 @@ function processOptions(webpackOptions) {
337
337
// were specified, but since argv.port is 8080, options.port will be
338
338
// tried first instead.
339
339
options . port = argv . port === DEFAULT_PORT ? defaultTo ( options . port , argv . port ) : defaultTo ( argv . port , options . port ) ;
340
+
340
341
if ( options . port != null ) {
341
342
startDevServer ( wpOpt , options ) ;
342
343
return ;
@@ -370,7 +371,7 @@ function startDevServer(webpackOptions, options) {
370
371
} ) ) ;
371
372
}
372
373
373
- const uri = createDomain ( options ) + ( options . inline !== false || options . lazy === true ? '/' : '/webpack-dev-server/' ) ;
374
+ const suffix = ( options . inline !== false || options . lazy === true ? '/' : '/webpack-dev-server/' ) ;
374
375
375
376
let server ;
376
377
try {
@@ -415,13 +416,17 @@ function startDevServer(webpackOptions, options) {
415
416
const READ_WRITE = 438 ;
416
417
fs . chmod ( options . socket , READ_WRITE , ( fsError ) => {
417
418
if ( fsError ) throw fsError ;
419
+
420
+ const uri = createDomain ( options , server . listeningApp ) + suffix ;
418
421
reportReadiness ( uri , options ) ;
419
422
} ) ;
420
423
} ) ;
421
424
} else {
422
425
server . listen ( options . port , options . host , ( err ) => {
423
426
if ( err ) throw err ;
424
427
if ( options . bonjour ) broadcastZeroconf ( options ) ;
428
+
429
+ const uri = createDomain ( options , server . listeningApp ) + suffix ;
425
430
reportReadiness ( uri , options ) ;
426
431
} ) ;
427
432
}
0 commit comments