{"id":22437,"library":"tangl-i18next-vite","title":"tangl-i18next-vite","description":"Vite plugin for seamless i18next internationalization integration, v1.2.4. Provides fast, optimized bundling with automatic locale splitting and TypeScript support. Actively maintained. Differentiator: lightweight, zero-config setup compared to heavier alternatives like react-i18next.","status":"active","version":"1.2.4","language":"javascript","source_language":"en","source_url":"https://github.com/tangl-services/tangl-dev","tags":["javascript","tangl","typescript"],"install":[{"cmd":"npm install tangl-i18next-vite","lang":"bash","label":"npm"},{"cmd":"yarn add tangl-i18next-vite","lang":"bash","label":"yarn"},{"cmd":"pnpm add tangl-i18next-vite","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM-only; CJS require will fail.","wrong":"const tanglI18nextVite = require('tangl-i18next-vite')","symbol":"default","correct":"import tanglI18nextVite from 'tangl-i18next-vite'"},{"note":"Named export, ensure correct spelling.","wrong":"import { tanglI18nextVite } from 'tangl-i18next-vite'","symbol":"vitePlugin","correct":"import { tanglI18nextVite } from 'tangl-i18next-vite'"},{"note":"TypeScript type import to avoid runtime bundle inclusion.","wrong":"import { PluginOptions } from 'tangl-i18next-vite'","symbol":"type","correct":"import type { PluginOptions } from 'tangl-i18next-vite'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport tanglI18nextVite from 'tangl-i18next-vite';\n\nexport default defineConfig({\n  plugins: [\n    tanglI18nextVite({\n      locales: ['en', 'es'],\n      defaultLocale: 'en',\n      sourceDir: 'src/locales',\n      outDir: 'dist/locales',\n    }),\n  ],\n});","lang":"typescript","description":"Basic Vite configuration integrating the tangl-i18next-vite plugin with two locales."},"warnings":[{"fix":"Update your Vite config to pass locales as an array e.g., locales: ['en', 'es'].","message":"Plugin options structure changed in v1.2.0: 'locales' is now an array, not comma-separated string.","severity":"breaking","affected_versions":"<1.2.0"},{"fix":"Remove 'namespaces' and reorganize locale files into subdirectories per namespace.","message":"The 'namespaces' option is deprecated in v1.1.0. Use 'locales' with nested folder structure instead.","severity":"deprecated","affected_versions":">=1.1.0 <1.2.4"},{"fix":"Ensure all locale files are .json and located under sourceDir.","message":"Source locale files must have a .json extension; otherwise, the plugin ignores them silently.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Set 'moduleResolution' to 'bundler' or 'node16' in tsconfig.json.","message":"When using TypeScript, the plugin type definitions are only bundled for ESM; CJS projects may need @ts-ignore or explicit type declarations.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'activ':24 'altern':35 'automat':18 'bundl':16 'compar':32 'config':30 'differenti':26 'fast':14 'heavier':34 'i18next':3,9,39 'integr':11 'internation':10 'javascript':40 'lightweight':27 'like':36 'local':19 'maintain':25 'optim':15 'plugin':6 'provid':13 'react':38 'react-i18next':37 'seamless':8 'setup':31 'split':20 'support':23 'tangl':2,41 'tangl-i18next-vite':1 'typescript':22,42 'v1.2.4':12 'vite':4,5 'zero':29 'zero-config':28","created_at":"2026-04-27T17:05:10.431425+00:00","updated_at":"2026-04-27T17:05:10.431425+00:00","problems":[{"fix":"Install the package: npm install tangl-i18next-vite --save-dev; for type resolution issues, set 'moduleResolution': 'bundler' in tsconfig.","cause":"The package is not installed or TypeScript cannot resolve types for CJS.","error":"Cannot find module 'tangl-i18next-vite' or its corresponding type declarations."},{"fix":"Use dynamic import() or convert your project to ESM (set 'type': 'module' in package.json).","cause":"tangl-i18next-vite is ESM-only and cannot be require'd directly.","error":"SyntaxError: Unexpected token 'export'"},{"fix":"Use import { tanglI18nextVite } from 'tangl-i18next-vite' instead of default import.","cause":"Incorrect import syntax; the plugin expects a named import.","error":"The requested module 'tangl-i18next-vite' does not provide an export named 'default'"},{"fix":"Change to locales: ['en', 'es'] per v1.2.0+ breaking change.","cause":"Passing locales as a comma-separated string (old API) instead of array.","error":"Plugin 'vite-plugin-i18n' (tangl-i18next-vite) threw an error: locales option must be an array"}],"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":"https://tangl.cloud/en","github":"https://github.com/tangl-services/tangl-dev","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/tangl-i18next-vite","openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-18","next_check":"2026-07-26","install_tag":null}}