File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
73
73
}
74
74
75
75
const compiler = webpack ( config )
76
+ const host = cliOptions . host || options . siteConfig . host || '0.0.0.0'
76
77
portfinder . basePort = cliOptions . port || options . siteConfig . port || 8080
77
78
const port = await portfinder . getPortPromise ( )
78
79
@@ -82,7 +83,7 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
82
83
isFirst = false
83
84
console . log (
84
85
`\n VuePress dev server listening at ${
85
- chalk . cyan ( `http://localhost :${ port } ${ options . publicPath } ` )
86
+ chalk . cyan ( `http://${ host } :${ port } ${ options . publicPath } ` )
86
87
} \n`
87
88
)
88
89
} else {
@@ -97,7 +98,7 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
97
98
// in cwd it would break the server
98
99
content : [ nonExistentDir ] ,
99
100
compiler,
100
- host : cliOptions . host || options . siteConfig . host || '0.0.0.0' ,
101
+ host,
101
102
dev : { logLevel : 'warn' } ,
102
103
hot : { logLevel : 'error' } ,
103
104
logLevel : 'error' ,
You can’t perform that action at this time.
0 commit comments