In a Next 10 app using i18n and target: serverless, Next does not seem to generate prerendered html _specifically_ for index routes.
In a Next 9.x app (or Next 10 app not using i18n) using target: serverless, Next generates prerendered html for pages/index.js which can be found at .next/serverless/pages/index.html. Now, in Next 10 with i18n, Next puts its prerendered html in directories for each locale aka .next/serverless/pages/{locale}/page.html. However, it seems to omit index.js/index.html in this process.
Note: this may be similar to or a duplicate of https://github.com/vercel/next.js/issues/19095 and possibly resolved by https://github.com/vercel/next.js/pull/19116/files but not sure if that's (optional) catch-all specific
Steps to reproduce the behavior, please provide code snippets or a repository:
Use getStaticProps in pages/index.js with i18n and target:serverless and have Next generate prerendered html somewhere in .next/serverless/pages
Add any other context about the problem here.
Could you try next@canary? This issue may already have been resolved.
@rokinsky
still an issue in canary
you can see in the tree under .next that there's no prerendered index.html

馃 but is index.js becoming es.html and en.html..? i dont know why i didnt consider that before right now.. @rokinsky
edit: yeah, it is. that said, should it be? 馃
tangentially related:
a static SSG route i.e. pages/getStaticProps/static.js with i18n and target: serverless gets generated into .next as ->
.next/serverless/pages/getStaticProps/static.js
.next/serverless/pages/en/getStaticProps/static.html
.next/serverless/pages/es/getStaticProps/static.json
_but_
the prerender-manifest says the dataRoute for getStaticProps/static is /_next/data/{BUILD_ID}/getStaticProps/static.json. dynamic routes have the locale in their dataRoute i.e. /data/{BUILD_ID}/en/getStaticProps/withFallback/3.json. the internals behind i18n seem to be very confusing. why does the prerender-manifest only show static routes once (without the locales) whereas dynamic routes have the locale pre-included? this is causing static routes to have incorrect dataRoutes depending on their locale.