Hey everyone, I'm using remix-i18next together with arc.codes.
I have my translation files in /public/locales/{{lng}}.json
Locally is everything working perfectly but in the deployed version, I'm having hydration errors. The reason is, that the server doesn't find the translation file.
I have in my i18next.server.ts file, the loadPath as follows:
backend: {
loadPath: resolve("../../public/locales/{{lng}}.json"),
},
The path is correct since it is working locally. But in the deployed version, the resolve is not working and the server is not finding the file.
In my remix.config.js I have publicPath: "/_static/build/" because arc.codes saves everything in /_static/build/.
How can I make i18next.server.ts find the locales file in the server that have a dynamic path based on the language?
@wraith gull maybe you know?