{"id":22063,"library":"rollup-plugin-i18next-conv","title":"rollup-plugin-i18next-conv","description":"A Rollup plugin that imports PO (gettext) files as i18next-compatible JSON objects, enabling seamless integration of i18next translation workflows into your build. Version 10.0.0 requires Node >=20 and supports Rollup 2/3/4 and i18next-conv >=14. Released about every 6 months with breaking changes tied to Node EOL. Differentiators: deterministic locale extraction from file paths, customizable include/exclude patterns, and passthrough of all i18next-conv options. Unlike alternatives, it focuses exclusively on PO file conversion with zero runtime overhead.","status":"active","version":"10.0.0","language":"javascript","source_language":"en","source_url":"https://github.com/dotcore64/rollup-plugin-i18next-conv","tags":["javascript","rollup","i18next","gettext"],"install":[{"cmd":"npm install rollup-plugin-i18next-conv","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-i18next-conv","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-i18next-conv","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency – required at runtime for converting PO files to i18next JSON format.","package":"i18next-conv","optional":false},{"reason":"Peer dependency – required as the build system; versions 2, 3, or 4 supported.","package":"rollup","optional":false}],"imports":[{"note":"Module is ESM-only since v7.0.0. Use default import.","wrong":"const i18next = require('rollup-plugin-i18next-conv').default","symbol":"default","correct":"import i18next from 'rollup-plugin-i18next-conv'"},{"note":"The module exports a default function, not a named export. Named import will yield undefined.","wrong":"import { i18next } from 'rollup-plugin-i18next-conv'","symbol":"i18next","correct":"import i18next from 'rollup-plugin-i18next-conv'"},{"note":"Since v7, the package is ESM-only. Use dynamic import inside an async context or switch to ESM.","wrong":"const i18next = require('rollup-plugin-i18next-conv')","symbol":"require (CJS)","correct":"const i18next = await import('rollup-plugin-i18next-conv')"}],"quickstart":{"code":"// rollup.config.js\nimport i18next from 'rollup-plugin-i18next-conv';\nimport path from 'path';\n\nexport default {\n  input: 'src/main.js',\n  output: {\n    file: 'dist/bundle.js',\n    format: 'iife'\n  },\n  plugins: [\n    i18next({\n      include: ['**/locale/**/*.po'],\n      exclude: ['node_modules/**'],\n      determineLocale: (filename) => filename.split(path.sep).slice(-3)[0],\n      keyseparator: '$$'\n    })\n  ]\n};","lang":"javascript","description":"Configures i18next-conv Rollup plugin to import PO files from locale directories, with custom locale detection and key separator."},"warnings":[{"fix":"Upgrade Node.js to version 20 or later.","message":"Node.js >=20 required since v10.0.0","severity":"breaking","affected_versions":">=10.0.0"},{"fix":"Use import statements or dynamic import() instead of require().","message":"ESM-only module; CommonJS require() no longer works","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Update i18next-conv to version 14 or higher.","message":"Minimum peer dependency i18next-conv >=14 required since v8.0.0","severity":"breaking","affected_versions":">=8.0.0"},{"fix":"Check that your Rollup version is ^2.0.0, ^3.0.0, or ^4.0.0.","message":"Rollup 3 support dropped; v8.1.0 added Rollup 4 support","severity":"breaking","affected_versions":">=8.1.0"},{"fix":"Migrate to Rollup 3 or 4.","message":"Rollup 2 support deprecated; future versions may require Rollup >=3","severity":"deprecated","affected_versions":">=10.0.0"},{"fix":"Override determineLocale function if your folder structure differs.","message":"Default locale extraction assumes locale folder is third segment from end of path","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `npm install --save-dev rollup-plugin-i18next-conv` and ensure package.json includes it.","cause":"Missing npm install or incorrect import path.","error":"Error: Cannot find module 'rollup-plugin-i18next-conv'"},{"fix":"Change to `import i18next from 'rollup-plugin-i18next-conv'`.","cause":"Using named import `{ i18next }` instead of default import.","error":"TypeError: i18next is not a function"},{"fix":"Run `npm install --save-dev i18next-conv`.","cause":"Missing peer dependency i18next-conv.","error":"Error: The 'i18next-conv' package is required. Please install it."},{"fix":"Switch to import syntax or use dynamic import().","cause":"Using require() on an ESM-only package (>= v7).","error":"Error [ERR_REQUIRE_ESM]: require() of ES Module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}