diff --git a/lib/allNextJsPages.js b/lib/allNextJsPages.js index 4f57d35..4de738b 100644 --- a/lib/allNextJsPages.js +++ b/lib/allNextJsPages.js @@ -55,7 +55,7 @@ const getAllPages = () => { // the JSON data to the Netlify Function. const dataRoute = dataRoutes.find(({ page }) => page === route); if (dataRoute) - alternativeRoutes.push(join("/_next/data", buildId, `${route}.json`)); + alternativeRoutes.push(join("/_next/data", buildId, `${route === "/" ? "/index" : route}.json`)); pages.push(new Page({ route, type, filePath, alternativeRoutes })); });