serverless-next.js
serverless-next.js copied to clipboard
staticNotFound not includes domain locale
Issue Summary
The method staticNotFound is not considering domain locale, it search locale on uri https://github.com/serverless-nextjs/serverless-next.js/blob/6d4ae936d64d0dda1d4b077ddc402b6f1afae88b/packages/libs/core/src/route/notfound.ts#L15
We can call findDomainLocale on this place? https://github.com/serverless-nextjs/serverless-next.js/blob/825812287fe8f1740cf5368acea2ec35e89dd26c/packages/libs/core/src/route/locale.ts#L34
Actual behavior
Static not found page is rendered only with default locale
Expected behavior
Site renders localized 404 page
Steps to reproduce
Access a route which if not catch by Next.js pages or rewrites
Screenshots/Code/Configuration/Logs
Versions
- OS/Environment:
- @sls-next/serverless-component version: 3.6.0
- Next.js version: 11.1.0
Additional context
i18n: {
locales: ['pt', 'en-US', 'pt-BR'],
defaultLocale: 'pt-BR',
localeDetection: false,
domains: [
{
domain: 'example.com',
defaultLocale: 'en-US'
}
]
}
Checklist
- [x] You have reviewed the README and FAQs, which answers several common questions.
- [x] You have reviewed our DEBUGGING wiki and have tried your best to include complete information and reproduction steps (including your configuration) as is possible. As there is only one maintainer (who maintains this in his free time) and thus very limited resources, if you have time, please try to debug the issue a bit yourself if possible.
- [x] You have first tried using the most recent
latest
oralpha
@sls-next/serverless-component
release version, which may have already fixed your issue or implemented the feature you are trying to use. Note that the oldserverless-next.js
component and theserverless-next.js
plugin are deprecated and no longer maintained.