The new built-in localization in Next.js 10 allows to have the locale as a path prefix, e.g.:
/about
/de/about
/es/about
All three routes will open pages/about.tsx. This works fine when I run it locally.
When I deploy it using serverless-next.js, it gives a 404 for /de/about and /es/about. Just /about still works.
Is this something that the Serverless Next.js Component doesn't support yet, or am I doing something wrong?
Thanks!
Yeah, Next.js 10 just came out two days ago, so it'll take some time to add those new features, since we have custom routing/rendering logic optimized for Lambda@Edge. I've tagged this with enhancement.
But I've tested the existing end-to-end tests with Next.js 10 and nothing broke, so looks like all the existing features work as expected.
I am also have the same issue 404 on not root pages.
/en for example) though, there is a strange behaviour when refreshing page that has locale subpath:
Most helpful comment
Yeah, Next.js 10 just came out two days ago, so it'll take some time to add those new features, since we have custom routing/rendering logic optimized for Lambda@Edge. I've tagged this with enhancement.
But I've tested the existing end-to-end tests with Next.js 10 and nothing broke, so looks like all the existing features work as expected.