Serverless-next.js: Next.js 10 localization in pathname

Created on 29 Oct 2020  路  2Comments  路  Source: serverless-nextjs/serverless-next.js

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!

enhancement release-1.19

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.

All 2 comments

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.

  • On the root page (/en for example) though, there is a strange behaviour when refreshing page that has locale subpath:
    image
  • There are many redirects with 307 and it crashes.
Was this page helpful?
0 / 5 - 0 ratings

Related issues

dphang picture dphang  路  24Comments

arelaxend picture arelaxend  路  15Comments

oste picture oste  路  19Comments

jschimmoeller picture jschimmoeller  路  82Comments

medv picture medv  路  15Comments