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

Avoid lambda nomenclature when `target != 'serverless'` (#7650)

上级 353e5051
......@@ -443,5 +443,9 @@ export default async function build(dir: string, conf = null): Promise<void> {
await flyingShuttle.save(allStaticPages, pageInfos)
}
printTreeView(Object.keys(allMappedPages), allPageInfos)
printTreeView(
Object.keys(allMappedPages),
allPageInfos,
target === 'serverless'
)
}
......@@ -37,7 +37,8 @@ export interface PageInfo {
export function printTreeView(
list: string[],
pageInfos: Map<string, PageInfo>
pageInfos: Map<string, PageInfo>,
serverless: boolean
) {
const getPrettySize = (_size: number): string => {
const size = prettyBytes(_size)
......@@ -73,7 +74,9 @@ export function printTreeView(
? ' '
: pageInfo && pageInfo.static
? chalk.bold('')
: 'λ'
: serverless
? 'λ'
: 'σ'
} ${item}`,
...(pageInfo
? [
......@@ -104,13 +107,21 @@ export function printTreeView(
console.log(
textTable(
[
[
'λ',
'(Lambda)',
`page was emitted as a lambda (i.e. ${chalk.cyan(
'getInitialProps'
)})`,
],
serverless
? [
'λ',
'(Lambda)',
`page was emitted as a lambda (i.e. ${chalk.cyan(
'getInitialProps'
)})`,
]
: [
'σ',
'(Server)',
`page will be server rendered (i.e. ${chalk.cyan(
'getInitialProps'
)})`,
],
[
chalk.bold(''),
'(Static File)',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册