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
afbb5636
Unverified
Commit
afbb5636
authored
Oct 18, 2021
by
JJ Kasper
Committed by
GitHub
Oct 18, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix trace when initial file is also child (#30048)
* Fix trace when initial file is also child * update page count test
parent
b794c171
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
2 deletions
+37
-2
next-trace-entrypoints-plugin.ts
...xt/build/webpack/plugins/next-trace-entrypoints-plugin.ts
+5
-1
client-error.js
test/integration/production/pages/client-error.js
+13
-0
index.test.js
test/integration/production/test/index.test.js
+19
-1
No files found.
packages/next/build/webpack/plugins/next-trace-entrypoints-plugin.ts
View file @
afbb5636
...
@@ -327,7 +327,11 @@ export class TraceEntryPointsPlugin implements webpack.Plugin {
...
@@ -327,7 +327,11 @@ export class TraceEntryPointsPlugin implements webpack.Plugin {
for
(
const
file
of
fileList
!
)
{
for
(
const
file
of
fileList
!
)
{
const
reason
=
reasons
!
.
get
(
file
)
const
reason
=
reasons
!
.
get
(
file
)
if
(
!
reason
||
reason
.
type
===
'initial'
||
!
reason
.
parents
)
{
if
(
!
reason
||
!
reason
.
parents
||
(
reason
.
type
===
'initial'
&&
reason
.
parents
.
size
===
0
)
)
{
continue
continue
}
}
propagateToParents
(
reason
.
parents
,
file
)
propagateToParents
(
reason
.
parents
,
file
)
...
...
test/integration/production/pages/client-error.js
0 → 100644
View file @
afbb5636
import
Link
from
'next/link'
import
Error
from
'next/error'
export
default
function
Page
(
props
)
{
return
(
<>
<
Error
title
=
"something went wrong (on purpose)"
/>
<
Link
href
=
"/"
>
<
a
>
to
home
<
/a
>
<
/Link
>
<
/
>
)
}
test/integration/production/test/index.test.js
View file @
afbb5636
...
@@ -58,7 +58,7 @@ describe('Production Usage', () => {
...
@@ -58,7 +58,7 @@ describe('Production Usage', () => {
})
})
it
(
'should contain generated page count in output'
,
async
()
=>
{
it
(
'should contain generated page count in output'
,
async
()
=>
{
const
pageCount
=
39
const
pageCount
=
40
expect
(
output
).
toContain
(
`Generating static pages (0/
${
pageCount
}
)`
)
expect
(
output
).
toContain
(
`Generating static pages (0/
${
pageCount
}
)`
)
expect
(
output
).
toContain
(
expect
(
output
).
toContain
(
`Generating static pages (
${
pageCount
}
/
${
pageCount
}
)`
`Generating static pages (
${
pageCount
}
/
${
pageCount
}
)`
...
@@ -79,6 +79,22 @@ describe('Production Usage', () => {
...
@@ -79,6 +79,22 @@ describe('Production Usage', () => {
],
],
notTests
:
[
/node_modules
\/
react
\/
cjs
\/
react
\.
development
\.
js/
],
notTests
:
[
/node_modules
\/
react
\/
cjs
\/
react
\.
development
\.
js/
],
},
},
{
page
:
'/client-error'
,
tests
:
[
/webpack-runtime
\.
js/
,
/chunks
\/
.*
?\.
js/
,
/node_modules
\/
react
\/
index
\.
js/
,
/node_modules
\/
react
\/
package
\.
json/
,
/node_modules
\/
react
\/
cjs
\/
react
\.
production
\.
min
\.
js/
,
/next
\/
link
\.
js/
,
/next
\/
dist
\/
client
\/
link
\.
js/
,
/next
\/
dist
\/
shared
\/
lib
\/
router
\/
utils
\/
resolve-rewrites
\.
js/
,
/next
\/
dist
\/
pages
\/
_error
\.
js/
,
/next
\/
error
\.
js/
,
],
notTests
:
[
/node_modules
\/
react
\/
cjs
\/
react
\.
development
\.
js/
],
},
{
{
page
:
'/dynamic'
,
page
:
'/dynamic'
,
tests
:
[
tests
:
[
...
@@ -110,6 +126,8 @@ describe('Production Usage', () => {
...
@@ -110,6 +126,8 @@ describe('Production Usage', () => {
notTests
:
[
notTests
:
[
/node_modules
\/
react
\/
cjs
\/
react
\.
development
\.
js/
,
/node_modules
\/
react
\/
cjs
\/
react
\.
development
\.
js/
,
/node_modules
\/
nanoid
\/
index
\.
cjs/
,
/node_modules
\/
nanoid
\/
index
\.
cjs/
,
/next
\/
dist
\/
pages
\/
_error
\.
js/
,
/next
\/
error
\.
js/
,
],
],
},
},
{
{
...
...
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