File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 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 = {}) {
7373 }
7474
7575 const compiler = webpack ( config )
76+ const host = cliOptions . host || options . siteConfig . host || '0.0.0.0'
7677 portfinder . basePort = cliOptions . port || options . siteConfig . port || 8080
7778 const port = await portfinder . getPortPromise ( )
7879
@@ -82,7 +83,7 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
8283 isFirst = false
8384 console . log (
8485 `\n VuePress dev server listening at ${
85- chalk . cyan ( `http://localhost :${ port } ${ options . publicPath } ` )
86+ chalk . cyan ( `http://${ host } :${ port } ${ options . publicPath } ` )
8687 } \n`
8788 )
8889 } else {
@@ -97,7 +98,7 @@ module.exports = async function dev (sourceDir, cliOptions = {}) {
9798 // in cwd it would break the server
9899 content : [ nonExistentDir ] ,
99100 compiler,
100- host : cliOptions . host || options . siteConfig . host || '0.0.0.0' ,
101+ host,
101102 dev : { logLevel : 'warn' } ,
102103 hot : { logLevel : 'error' } ,
103104 logLevel : 'error' ,
You can’t perform that action at this time.
0 commit comments