Closed ScreamZ closed 6 months ago
There are detailed docs about this in the matcher config section (see also "Can I avoid hardcoding the locales in the matcher config?").
Unfortunately there's no ideal matcher that I know of, the one we suggest in the docs is known to have the least amount of downsides from my experience. If the one you're suggesting works well for your app, that's absolutely fine, just make sure that if you're adding anything to the public
folder that you want to update your matcher.
Link to page
https://next-intl-docs.vercel.app/docs/getting-started/app-router#middleware
Describe the problem
Currently you're indicating that we just need to define
I wanted to use a dynamic configuration, but this is a nextjs limitation it's impossible to write something like
Therefore I would suggest to improve the documentation to specify this to those who will try like me
Also I'm giving another matcher
matcher: ["/((?!api|_next/static|_next/image|site.webmanifest|favicon).*)"]
that seems to work.