Example of how to use a server-side HTTP backend with v4? #58
-
I'm looking to migrate my app from v3 to v4, but I'm having trouble understanding how to use a fetch/http backend on the server-side. In v3 I used the Here's what I'm trying: // i18n.server.ts
import Backend from 'i18next-http-backend'
import { RemixI18Next } from 'remix-i18next';
export const i18n = new RemixI18Next({
backend: Backend, // Property 'type' is missing in type 'typeof I18NextHttpBackend' but required in type 'NewableModule<BackendModule<unknown>>'.
}); I would assume that this error is happening because there is no Please could you provide an example of how you might implement an HTTP backend on the server-side? Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
If the backend doesn't conform to the interface i18next exports you should open an issue on that backend repository. The i18next-fetch-backend has the type key and because Remix polyfill Fetch it should work correctly. |
Beta Was this translation helpful? Give feedback.
If the backend doesn't conform to the interface i18next exports you should open an issue on that backend repository.
The i18next-fetch-backend has the type key and because Remix polyfill Fetch it should work correctly.