File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,20 @@ module.exports = class DevLogPlugin {
1313
1414 const { displayHost, port, publicPath } = this . options
1515 const time = new Date ( ) . toTimeString ( ) . match ( / ^ [ \d : ] + / ) [ 0 ]
16+ const displayUrl = `http://${ displayHost } :${ port } ${ publicPath } `
1617
17- logger . success ( `\n${ chalk . gray ( `[${ time } ]` ) } Build ${ chalk . italic ( stats . hash . slice ( 0 , 6 ) ) } finished in ${ stats . endTime - stats . startTime } ms!` )
18+ logger . success (
19+ `\n${ chalk . gray ( `[${ time } ]` ) } Build ${ chalk . italic ( stats . hash . slice ( 0 , 6 ) ) } ` +
20+ `finished in ${ stats . endTime - stats . startTime } ms! ` +
21+ (
22+ isFirst
23+ ? ''
24+ : `${ chalk . gray ( `(${ displayUrl } )` ) } `
25+ )
26+ )
1827 if ( isFirst ) {
1928 isFirst = false
20- console . log ( `\n${ chalk . gray ( '>' ) } VuePress dev server listening at ${ chalk . cyan ( `http:// ${ displayHost } : ${ port } ${ publicPath } ` ) } ` )
29+ console . log ( `\n${ chalk . gray ( '>' ) } VuePress dev server listening at ${ chalk . cyan ( displayUrl ) } ` )
2130 }
2231 } )
2332 compiler . hooks . invalid . tap ( 'vuepress-log' , clearScreen )
You can’t perform that action at this time.
0 commit comments