Open
Description
When my Next.js site using pages router has i18n enabled, has middleware and has rewrites, the client-side navigation doesn't work properly for non-default locales (fi) with @netlify/plugin-nextjs version 5.9.3 and 5.9.4.
What happens:
- Open https://deploy-preview-4--jovial-salmiakki-51d4db.netlify.app/fi
- Hover on link "toinen" and see (in devtools network tab) how 404 is returned in the prefetch
- Click on link "toinen" -> a full page reload happens
What I expected to happen:
- In step 2 I expect the prefetch to return the page props instead of 404.
- In step 3 I expect the client-side navigation to work.
If you switch to the default locale (English) the same does not happen. Also, when you downgrade to plugin version 5.9.2 the problem disappears: https://deploy-preview-3--jovial-salmiakki-51d4db.netlify.app/fi
Minimal reproduction repository here:
https://github.com/aleehedl/netlify-next-plugin-error
Metadata
Metadata
Assignees
Labels
No labels