Unverified Commit 72cf080a authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Fix index data route for adapter build-complete (#83730)

Fixes another case caught by testing ensuring we normalize the
`_next/data` filename correctly for `index`.
parent 33016f3c
......@@ -851,7 +851,10 @@ export async function handleBuildComplete({
outputs.prerenders.push(initialOutput)
if (dataRoute) {
let dataFilePath = path.join(pagesDistDir, `${route}.json`)
let dataFilePath = path.join(
pagesDistDir,
`${route === '/' ? 'index' : route}.json`
)
if (isAppPage) {
// When experimental PPR is enabled, we expect that the data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment