github i18next/next-i18next v16.0.7

5 hours ago
  • Pages Router: fix duplicate i18next in client bundles — v16 shipped the Pages Router as CJS-only, which forced bundlers to load i18next via its require condition (i18next/dist/cjs) while user code loaded it via the import condition (i18next/dist/esm), producing two copies of i18next in the same bundle. The Pages Router now builds dual ESM + CJS outputs, and the ./pages and ./pages/serverSideTranslations exports declare matching import/require conditions. The server-only filesystem branch of createConfig has been extracted into a separate serverSideConfig module (injected via hook by serverSideTranslations) so createConfig no longer pulls Node built-ins into client bundles. Note: appWithTranslation no longer re-runs the server-side validation/preload during SSR — that work happens once, up-front, inside serverSideTranslations (in practice a no-op since appWithTranslation uses the browser client with pre-loaded resources). #2342

Don't miss a new next-i18next release

NewReleases is sending notifications on new releases.