-
-
Notifications
You must be signed in to change notification settings - Fork 326
Open
Labels
Description
Is your feature request related to a problem? Please describe.
It seems like there's work happening on the Next.js side on a middleware revamp: vercel/next.js#46722 (comment)
I'm using this thread to collect aspects about the current next-intl middleware that we could potentially address in case a revamp is relevant after the Next.js change.
Describe the solution you'd like
My personal wishlist for Next.js:
- Passing a
localeto the rendering phase (see Reading params deeply in Server Components (e.g. for i18n / multi-tenancy) vercel/next.js#58862). Ideally this would be possible without a middleware in the first place though. Update: Seems like this is coming asrootParams. - Easy exclusion of: Next.js internals
_next, static files (both public as well as generated by Next.js fromicon.png& friends) - A dynamically created matcher
Mentioned here.
Separately from this, there are some use cases we could support better that do not rely on Next.js:
- Get the locale within middleware #1356
- Locale detection could be more flexible #1369
- Feature Request: RoutingConfig for Locale Cookie Sync Control #1793
- Maybe opting out of root redirect? Possible already by adapting the matcher, but would there be an advantage to make this more explicit?
We can make these changes in any case, but in case a refactoring is necessary after the Next.js change, maybe it'd be worth waiting a bit. - Ability to disable routing redirects #2056