- App Router: no "uncached data" error in
next devwithcacheComponents: trueon the first request - without inlineresources, i18next'sinit()starts loading in asetTimeout(load, 0), and Next.js counted that timer in the first render after the dev server started as uncached data, pointing atawait getT()in the root layout. The shared server instance now inits withinitAsync: false, so loading starts insideinit()and the result is the same, one tick earlier.next buildwas never affected. Passi18nextOptions: { initAsync: true }for the old behavior. Side effect:i18next-fs-backendpassed viausereads withreadFileSyncwheninitAsyncisfalse. i18next < 24 ignores the option. Thanks @rkrisztian (#2353) - Docs:
cacheComponentsinnext dev-reloadOnPrerenderre-reads the locale files on every render, so leave it off withcacheComponents: true. Reading translations withfs(anfs-basedresourceLoader, orpublic/localeswithout one) is reported once per language innext dev. Animport()-basedresourceLoaderis not, andnext buildis the check to trust.