diff --git a/app/entry.server.tsx b/app/entry.server.tsx index 8b9ff03c..996c3631 100644 --- a/app/entry.server.tsx +++ b/app/entry.server.tsx @@ -29,9 +29,7 @@ export default async function handleRequest( ], }); - const namespaces = extractNamespaces( - context.routeModules as EntryContext['routeModules'], - ); + const namespaces = extractNamespaces(remixContext.routeModules); await initI18nServer( context.storefront.i18n.language.toLowerCase(), diff --git a/app/i18n/extractNamespaces.ts b/app/i18n/extractNamespaces.ts index 97bf46e8..fa4d3870 100644 --- a/app/i18n/extractNamespaces.ts +++ b/app/i18n/extractNamespaces.ts @@ -1,6 +1,7 @@ import {type UNSAFE_RouteModules} from '@remix-run/react'; import {type EntryContext} from '@remix-run/server-runtime'; +//https://github.com/sergiodxa/remix-i18next/blob/main/src/client.ts export function extractNamespaces( routeModules: UNSAFE_RouteModules | EntryContext['routeModules'], ): string[] {