{"id":25349,"library":"esbuild-plugin-i18next-loader","title":"esbuild-plugin-i18next-loader","description":"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.","status":"active","version":"1.1.5","language":"javascript","source_language":"en","source_url":"https://github.com/rowellx68/i18next-utilities","tags":["javascript","esbuild","i18next","loader","plugin","typescript"],"install":[{"cmd":"npm install esbuild-plugin-i18next-loader","lang":"bash","label":"npm"},{"cmd":"yarn add esbuild-plugin-i18next-loader","lang":"bash","label":"yarn"},{"cmd":"pnpm add esbuild-plugin-i18next-loader","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency required for plugin to function","package":"esbuild","optional":false},{"reason":"peer dependency for runtime locale usage","package":"i18next","optional":false}],"imports":[{"note":"ESM-only, no CommonJS support. Use dynamic import if needed.","wrong":"const i18nextPlugin = require('esbuild-plugin-i18next-loader').i18nextPlugin","symbol":"i18nextPlugin","correct":"import { i18nextPlugin } from 'esbuild-plugin-i18next-loader'"},{"note":"Default export is the plugin function, but named export is preferred.","wrong":"import { default as i18nextPlugin } from 'esbuild-plugin-i18next-loader'","symbol":"default","correct":"import i18nextPlugin from 'esbuild-plugin-i18next-loader'"},{"note":"Options type is not a runtime value; use type import for TypeScript.","wrong":"import { Options } from 'esbuild-plugin-i18next-loader'","symbol":"type Options","correct":"import type { Options } from 'esbuild-plugin-i18next-loader'"}],"quickstart":{"code":"import { i18nextPlugin } from 'esbuild-plugin-i18next-loader';\nimport esbuild from 'esbuild';\n\nawait esbuild.build({\n  entryPoints: ['./src/index.ts'],\n  write: true,\n  bundle: true,\n  plugins: [\n    i18nextPlugin({\n      namespaceResolution: 'basename',\n      paths: ['./src/locales'],\n    }),\n  ],\n});","lang":"typescript","description":"Shows how to use the plugin with esbuild to bundle i18next locale files from ./src/locales."},"warnings":[{"fix":"Use import syntax instead of require(). If using CommonJS, consider dynamic import.","message":"ESM-only since v1.1.3","severity":"breaking","affected_versions":">=1.1.3"},{"fix":"Set namespaceResolution to 'basename' or 'relativePath' as needed.","message":"namespaceResolution strategy must be set explicitly; if omitted, namespace defaults to basename but may cause collisions.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Use named import { i18nextPlugin } instead of default import.","message":"Plugin name changed from default export to named export in v1.1.0","severity":"deprecated","affected_versions":">=1.1.0"}],"env_vars":null,"search_vec":"'1.1.5':27 'alienfast/vite-plugin-i18next-loader':41 'basenam':48 'build':60 'bundl':9 'client':20 'client-sid':19 'current':23 'differenti':56 'esbuild':2,6,43,72 'esbuild-plugin-i18next-loader':1 'esm':58 'esm-on':57 'file':12 'generat':66 'i18next':4,10,32,73 'i18next-utilities':31 'includ':63 'javascript':71 'json/yaml':13 'loader':5,74 'local':54 'modul':17,65 'monorepo':34 'multipl':53 'namespac':45 'patch':37 'path':51,55 'plugin':3,7,75 'regular':36 'relat':50 'releas':28 'resolut':46 'rewrit':40 'shake':70 'side':21 'stabl':24 'support':44 'translat':11 'tree':69 'tree-shak':68 'type':62 'typescript':61,76 'updat':38 'use':22 'util':33 'version':25 'via':47 'virtual':16,64","created_at":"2026-05-01T13:44:18.243439+00:00","updated_at":"2026-05-01T13:44:18.243439+00:00","problems":[{"fix":"Run npm install --save-dev esbuild-plugin-i18next-loader and ensure import path is correct.","cause":"Package not installed or incorrect import path.","error":"Cannot find module 'esbuild-plugin-i18next-loader'"},{"fix":"Use dynamic import: const { i18nextPlugin } = await import('esbuild-plugin-i18next-loader');","cause":"Package is ESM-only, require() not allowed.","error":"require() of ES Module esbuild-plugin-i18next-loader not supported"},{"fix":"Use import { i18nextPlugin } from 'esbuild-plugin-i18next-loader';","cause":"Using default import after v1.1.0 when named export is required.","error":"TypeError: i18nextPlugin is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/rowellx68/i18next-utilities","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/esbuild-plugin-i18next-loader","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-05-01","next_check":"2026-07-30","install_tag":null}}