Open christoph-pflueger opened 2 years ago
Hi @git-chrisp, I added the trailing slash option to the next.config.js
in the repo example, and I don't experience any problem. Could you give more details, or better, a reproduction of the bug?
Reproduction: https://github.com/git-chrisp/next-translate-routes-nextjs-trailing-slash-bug
When visiting localhost:3000/de/ the following error is printed in the console:
next-dev.js?3515:32 Warning: Prop `href` did not match. Server: "/de/seite1" Client: "/de/seite1/"
At first, I could not reproduce: I don't know why, but I did not get the warning on Firefox. I tried on Chromium - just in case - and I got it. I added a fix in the next release.
Done. Please reopen this if it is not fixed for you.
@cvolant on next v13 I have the same problem.
Hi, I also get this error too while having trailing slash option true in next.config.js next-translate-routes: 1.9.1v next: 12.3.4v
NextJS has an option to configure trailing slashes in URLs: https://nextjs.org/docs/api-reference/next.config.js/trailing-slash
At the moment, this option causes mismatches between server and client.