esbuild plugin to bundle i18next translation files (JSON/YAML) into a virtual module for client-side use. Current stable version is 1.1.5, released under the i18next-utilities monorepo with regular patch updates. It rewrites alienfast/vite-plugin-i18next-loader for esbuild, supporting namespace resolution via basename or relative path, and multiple locale paths. Differentiators: ESM-only builds, TypeScript types included, virtual module generation for tree-shaking.
npm install esbuild-plugin-i18next-loaderNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the plugin with esbuild to bundle i18next locale files from ./src/locales.
Use import syntax instead of require(). If using CommonJS, consider dynamic import.
Set namespaceResolution to 'basename' or 'relativePath' as needed.
Use named import { i18nextPlugin } instead of default import.Run npm install --save-dev esbuild-plugin-i18next-loader and ensure import path is correct.
Use dynamic import: const { i18nextPlugin } = await import('esbuild-plugin-i18next-loader');Use import { i18nextPlugin } from 'esbuild-plugin-i18next-loader';