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
88de2328
Commit
88de2328
authored
Dec 13, 2019
by
Joe Haddad
Committed by
Tim Neutkens
Dec 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable Page Symbol For `/_error` (#9730)
parent
5a8ae915
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
2 deletions
+33
-2
utils.ts
packages/next/build/utils.ts
+1
-1
_error.js
...n/build-output/fixtures/with-error-static/pages/_error.js
+3
-0
index.js
...on/build-output/fixtures/with-error-static/pages/index.js
+3
-0
index.test.js
test/integration/build-output/test/index.test.js
+26
-1
No files found.
packages/next/build/utils.ts
View file @
88de2328
...
@@ -104,7 +104,7 @@ export async function printTreeView(
...
@@ -104,7 +104,7 @@ export async function printTreeView(
messages
.
push
([
messages
.
push
([
`
${
symbol
}
${
`
${
symbol
}
${
item
.
startsWith
(
'/_'
)
item
===
'/_app'
?
' '
?
' '
:
pageInfo
&&
pageInfo
.
static
:
pageInfo
&&
pageInfo
.
static
?
'○'
?
'○'
...
...
test/integration/build-output/fixtures/with-error-static/pages/_error.js
0 → 100644
View file @
88de2328
export
default
function
Error
()
{
return
<
p
>
An
error
has
occurred
<
/p
>
}
test/integration/build-output/fixtures/with-error-static/pages/index.js
0 → 100644
View file @
88de2328
export
default
function
()
{
return
<
div
/>
}
test/integration/build-output/test/index.test.js
View file @
88de2328
...
@@ -72,7 +72,7 @@ describe('Build Output', () => {
...
@@ -72,7 +72,7 @@ describe('Build Output', () => {
})
})
expect
(
stdout
).
toMatch
(
/
\/
[
]
*
\d{1,}
B/
)
expect
(
stdout
).
toMatch
(
/
\/
[
]
*
\d{1,}
B/
)
expect
(
stdout
).
toMatch
(
/
\/
_error
[
]
*
\d{1,}
B/
)
expect
(
stdout
).
toMatch
(
/
λ
\/
_error
[
]
*
\d{1,}
B/
)
expect
(
stdout
).
toMatch
(
/
\+
shared by all
[
0-9.
]
* kB/
)
expect
(
stdout
).
toMatch
(
/
\+
shared by all
[
0-9.
]
* kB/
)
expect
(
stdout
).
toMatch
(
/ runtime
\/
main
\.
js
[
0-9.
]
* kB/
)
expect
(
stdout
).
toMatch
(
/ runtime
\/
main
\.
js
[
0-9.
]
* kB/
)
...
@@ -83,4 +83,29 @@ describe('Build Output', () => {
...
@@ -83,4 +83,29 @@ describe('Build Output', () => {
expect
(
stdout
).
toContain
(
'○ /'
)
expect
(
stdout
).
toContain
(
'○ /'
)
})
})
})
})
describe
(
'Custom Static Error Output'
,
()
=>
{
const
appDir
=
join
(
fixturesDir
,
'with-error-static'
)
beforeAll
(
async
()
=>
{
await
remove
(
join
(
appDir
,
'.next'
))
})
// FIXME: this should be static
xit
(
'should specify /_error as static'
,
async
()
=>
{
const
{
stdout
}
=
await
nextBuild
(
appDir
,
[],
{
stdout
:
true
,
})
expect
(
stdout
).
toContain
(
'○ /_error'
)
})
// This test is not really correct.
// Remove this when fixed and enable the above one.
it
(
'should specify /_error as lambda even when static'
,
async
()
=>
{
const
{
stdout
}
=
await
nextBuild
(
appDir
,
[],
{
stdout
:
true
,
})
expect
(
stdout
).
toContain
(
'λ /_error'
)
})
})
})
})
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