QuiiBz / next-international

Type-safe internationalization (i18n) for Next.js
https://next-international.vercel.app
MIT License
1.19k stars 52 forks source link

is there ignoreRoutes property for ignore adding localization route to static file #402

Open SaddamMohsen opened 1 month ago

SaddamMohsen commented 1 month ago

i have a nextjs project using images from public folder after i add localization to it using nex-international the images can't showed on pages because the localization url added befor url to static images so my question is there ignoreRoutes property in next-international liked that in i18n i tried to using middleware but it didn't working as expected my folder structure is -public // where is the images -src --- -app ----- -local ------ -pages and the middleware matcher is like this matcher: [ "/((?!api|_next/static|_next/image|favicon.ico).*)", ], i need help thank in advance

ibm4n commented 1 month ago

I had the same issue, solved it by using this as the matcher: matcher: ["/((?!api|static|.*\\..*|_next|favicon.ico|robots.txt).*)"], I think the .*\\..* part did it.

BR