hozana / next-translate-routes

Flexible and translated routes for Next.js without custom server
MIT License
116 stars 30 forks source link

Cache issue upon changing the route name causes 404 #28

Closed c7nj7n closed 2 years ago

c7nj7n commented 2 years ago

First of all: your library rocks, it allowed me to rather easily translate my routes. Many thanks for this!

My issue: I made a change in my _routes.json for the "en" key, renamed it from "trade" to "sell" (see below). The route keeps being translated through (from next-translate-routes/link) as "trade"... only upon rm -rf .next/cache/* this starts to work as expected. Unfortunately this cache clearing is not possible or happening on Vercel, there might be something else going on?

"sell": { "de": "kaufen", "fr": "vendre", "en": "sell" },

Any thoughts?

cvolant commented 2 years ago

I had also some hard time trying to figure out what was going on... Permanent redirects are indeed cached by the browser: emptying it will solve the issue in the browser. As for Vercel, I have no idea, I don't use it myself...

It would be good to add a warning in the docs about this...

c7nj7n commented 2 years ago

I've been in contact with Vercel's support and this clearly is on their end.