Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
ee2bdb89
Unverified
Commit
ee2bdb89
authored
Jun 24, 2019
by
Joe Haddad
Committed by
GitHub
Jun 24, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid lambda nomenclature when `target != 'serverless'` (#7650)
parent
353e5051
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
10 deletions
+25
-10
index.ts
packages/next/build/index.ts
+5
-1
utils.ts
packages/next/build/utils.ts
+20
-9
No files found.
packages/next/build/index.ts
View file @
ee2bdb89
...
@@ -443,5 +443,9 @@ export default async function build(dir: string, conf = null): Promise<void> {
...
@@ -443,5 +443,9 @@ export default async function build(dir: string, conf = null): Promise<void> {
await
flyingShuttle
.
save
(
allStaticPages
,
pageInfos
)
await
flyingShuttle
.
save
(
allStaticPages
,
pageInfos
)
}
}
printTreeView
(
Object
.
keys
(
allMappedPages
),
allPageInfos
)
printTreeView
(
Object
.
keys
(
allMappedPages
),
allPageInfos
,
target
===
'serverless'
)
}
}
packages/next/build/utils.ts
View file @
ee2bdb89
...
@@ -37,7 +37,8 @@ export interface PageInfo {
...
@@ -37,7 +37,8 @@ export interface PageInfo {
export
function
printTreeView
(
export
function
printTreeView
(
list
:
string
[],
list
:
string
[],
pageInfos
:
Map
<
string
,
PageInfo
>
pageInfos
:
Map
<
string
,
PageInfo
>
,
serverless
:
boolean
)
{
)
{
const
getPrettySize
=
(
_size
:
number
):
string
=>
{
const
getPrettySize
=
(
_size
:
number
):
string
=>
{
const
size
=
prettyBytes
(
_size
)
const
size
=
prettyBytes
(
_size
)
...
@@ -73,7 +74,9 @@ export function printTreeView(
...
@@ -73,7 +74,9 @@ export function printTreeView(
?
' '
?
' '
:
pageInfo
&&
pageInfo
.
static
:
pageInfo
&&
pageInfo
.
static
?
chalk
.
bold
(
'⚡'
)
?
chalk
.
bold
(
'⚡'
)
:
'λ'
:
serverless
?
'λ'
:
'σ'
}
${
item
}
`
,
}
${
item
}
`
,
...(
pageInfo
...(
pageInfo
?
[
?
[
...
@@ -104,13 +107,21 @@ export function printTreeView(
...
@@ -104,13 +107,21 @@ export function printTreeView(
console
.
log
(
console
.
log
(
textTable
(
textTable
(
[
[
[
serverless
'λ'
,
?
[
'(Lambda)'
,
'λ'
,
`page was emitted as a lambda (i.e.
${
chalk
.
cyan
(
'(Lambda)'
,
'getInitialProps'
`page was emitted as a lambda (i.e.
${
chalk
.
cyan
(
)}
)`
,
'getInitialProps'
],
)}
)`
,
]
:
[
'σ'
,
'(Server)'
,
`page will be server rendered (i.e.
${
chalk
.
cyan
(
'getInitialProps'
)}
)`
,
],
[
[
chalk
.
bold
(
'⚡'
),
chalk
.
bold
(
'⚡'
),
'(Static File)'
,
'(Static File)'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment