未验证 提交 5e66656d 编写于 作者: J Joe Haddad 提交者: GitHub

Mark whether page is a lambda or static file in build output (#7553)

上级 ef903a25
......@@ -67,7 +67,13 @@ export function printTreeView(
const pageInfo = pageInfos.get(item)
messages.push([
`${symbol} ${item}`,
`${symbol} ${
item.startsWith('/_')
? ' '
: pageInfo && pageInfo.static
? chalk.bold('')
: 'λ'
} ${item}`,
...(pageInfo
? [
pageInfo.isAmp
......@@ -93,6 +99,30 @@ export function printTreeView(
})
)
console.log()
console.log(
textTable(
[
[
'λ',
'(Lambda)',
`page was emitted as a lambda (i.e. ${chalk.cyan(
'getInitialProps'
)})`,
],
[
chalk.bold(''),
'(Static File)',
'page was pre-rendered as static HTML',
],
],
{
align: ['l', 'l', 'l'],
stringLength: str => stripAnsi(str).length,
}
)
)
console.log()
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册