提交 510f24bd 编写于 作者: 雪洛's avatar 雪洛

fix: url log error

上级 4fea9878
......@@ -83,7 +83,7 @@ export const h5ServeFormatter: Formatter = {
if (networkLogs.length) {
// 延迟打印所有 network,仅最后一个 network 替换 ➜ 为 -,通知 hbx
const len = networkLogs.length - 1
networkLogs[len] = networkLogs[len].replace('', '-')
networkLogs[len] = networkLogs[len].replace('* Network', '- Network')
console.log(networkLogs.join('\n'))
networkLogs.length = 0
}
......
......@@ -204,7 +204,7 @@ function printServerUrls(
.map((detail) => {
const type = detail.address.includes('127.0.0.1')
? ' - Local: '
: ' - Network: '
: ' * Network: '
const host = detail.address.replace('127.0.0.1', hostname.name)
const url = `${protocol}://${host}:${colors.bold(port)}${base}`
return `${type} ${colors.cyan(url)}`
......@@ -214,7 +214,7 @@ function printServerUrls(
})
.forEach((msg, index, arr) => {
if (arr.length - 1 === index) {
info(msg.replace('', '-'))
info(msg.replace('* Network', '- Network'))
} else {
info(msg)
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册