You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App Router: backends are no longer attached during SSR — I18nProvider is a Client Component, but the App Router also renders it on the server, once per request, and its useState initializer therefore built a throwaway i18next instance in Node on every render. With a backend passed via use, that instance got a Node-side backend, and backends that refresh on a timer never let it go: i18next-locize-backend defaults reloadInterval to 1 hour whenever window is undefined, so every render left behind a live timer that kept refetching its namespaces forever. In production this showed up as a request floor that ratcheted upwards between deploys (measured on one app: ~90 requests/hour climbing to ~8,500 before a pod restart, ~190k downloads/day against a ~10k baseline). Backend plugins, including the built-in fetch loader, are now applied only in the browser, and partialBundledLanguages is off during the server pass, so SSR renders purely from resources. Non-backend plugins (detectors, post-processors) still apply in both passes.
getResources accepts a language filter — getResources(i18n, namespaces?, languages?). The shared server instance preloads every supported language, so the default return value serialized all of them into the HTML; on a four-language app that was ~440 KB per page. Pass [lng, fallbackLng] to ship only what the client renders.