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
5261ed8d
Unverified
Commit
5261ed8d
authored
Jun 11, 2025
by
Tim Neutkens
Committed by
GitHub
Jun 11, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack Build: Fix /index/index handling (#80413)
## What? Alternative for #80385
parent
fba3b9b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
14 deletions
+19
-14
manifest-loader.ts
packages/next/src/shared/lib/turbopack/manifest-loader.ts
+15
-8
turbopack-build-tests-manifest.json
test/turbopack-build-tests-manifest.json
+4
-6
No files found.
packages/next/src/shared/lib/turbopack/manifest-loader.ts
View file @
5261ed8d
...
@@ -478,22 +478,29 @@ export class TurbopackManifestLoader {
...
@@ -478,22 +478,29 @@ export class TurbopackManifestLoader {
}
}
const
sortedPageKeys
=
getSortedRoutes
(
pagesKeys
)
const
sortedPageKeys
=
getSortedRoutes
(
pagesKeys
)
const
c
onten
t
:
ClientBuildManifest
=
{
const
c
lientBuildManifes
t
:
ClientBuildManifest
=
{
__rewrites
:
normalizeRewritesForBuildManifest
(
rewrites
)
as
any
,
__rewrites
:
normalizeRewritesForBuildManifest
(
rewrites
)
as
any
,
...
Object
.
fromEntries
(
...
Object
.
fromEntries
(
sortedPageKeys
.
map
((
pathname
)
=>
[
sortedPageKeys
.
map
((
pathname
)
=>
{
pathname
,
let
filePath
[
`static/chunks/pages
${
pathname
===
'/'
?
'/index'
:
pathname
}
.js`
],
if
(
pathname
===
'/'
)
{
])
filePath
=
'/index.js'
}
else
if
(
pathname
.
endsWith
(
'/index'
))
{
filePath
=
`
${
pathname
}
/index.js`
}
else
{
filePath
=
`
${
pathname
}
.js`
}
return
[
pathname
,
[
`static/chunks/pages
${
filePath
}
`
]]
})
),
),
sortedPages
:
sortedPageKeys
,
sortedPages
:
sortedPageKeys
,
}
}
const
b
uildManifestJs
=
`self.__BUILD_MANIFEST =
${
JSON
.
stringify
(
const
clientB
uildManifestJs
=
`self.__BUILD_MANIFEST =
${
JSON
.
stringify
(
c
onten
t
c
lientBuildManifes
t
)}
;self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()`
)}
;self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB()`
await
writeFileAtomic
(
await
writeFileAtomic
(
join
(
this
.
distDir
,
'static'
,
this
.
buildId
,
'_buildManifest.js'
),
join
(
this
.
distDir
,
'static'
,
this
.
buildId
,
'_buildManifest.js'
),
b
uildManifestJs
clientB
uildManifestJs
)
)
await
writeFileAtomic
(
await
writeFileAtomic
(
join
(
this
.
distDir
,
'static'
,
this
.
buildId
,
'_ssgManifest.js'
),
join
(
this
.
distDir
,
'static'
,
this
.
buildId
,
'_ssgManifest.js'
),
...
...
test/turbopack-build-tests-manifest.json
View file @
5261ed8d
...
@@ -15234,11 +15234,10 @@
...
@@ -15234,11 +15234,10 @@
"nested index.js production mode should ssr page /index"
,
"nested index.js production mode should ssr page /index"
,
"nested index.js production mode should ssr page /index/index"
,
"nested index.js production mode should ssr page /index/index"
,
"nested index.js production mode should ssr page /index/project"
,
"nested index.js production mode should ssr page /index/project"
,
"nested index.js production mode should ssr page /index/user"
"nested index.js production mode should ssr page /index/user"
,
],
"failed"
:
[
"nested index.js production mode should follow link to /index/index"
"nested index.js production mode should follow link to /index/index"
],
],
"failed"
:
[],
"pending"
:
[
"pending"
:
[
"nested index.js development mode should 404 on /index/index/index"
,
"nested index.js development mode should 404 on /index/index/index"
,
"nested index.js development mode should client render page /"
,
"nested index.js development mode should client render page /"
,
...
@@ -16895,11 +16894,10 @@
...
@@ -16895,11 +16894,10 @@
},
},
"test/integration/prerender-export/test/index.test.js"
:
{
"test/integration/prerender-export/test/index.test.js"
:
{
"passed"
:
[
"passed"
:
[
"SSG Prerender export production mode export mode should copy prerender files and honor exportTrailingSlash"
"SSG Prerender export production mode export mode should copy prerender files and honor exportTrailingSlash"
,
],
"failed"
:
[
"SSG Prerender export production mode export mode should navigate between pages successfully"
"SSG Prerender export production mode export mode should navigate between pages successfully"
],
],
"failed"
:
[],
"pending"
:
[],
"pending"
:
[],
"flakey"
:
[],
"flakey"
:
[],
"runtimeError"
:
false
"runtimeError"
:
false
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