Registry / web-framework / tangl-i18next-vite

tangl-i18next-vite

JSON →
library1.2.4jsnpmunverified

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.

npm install tangl-i18next-vite
INSTALL
IMPORT
SIG · TANGL-I18NEXT-VITE
T
tangl-i18next-vite
web-frameworkjavascriptv1.2.4
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import tanglI18nextVite from 'tangl-i18next-vite'
const tanglI18nextVite = require('tangl-i18next-vite')
ESM-only; CJS require will fail.
vitePlugin
import { tanglI18nextVite } from 'tangl-i18next-vite'
import { tanglI18nextVite } from 'tangl-i18next-vite'
Named export, ensure correct spelling.
type
import type { PluginOptions } from 'tangl-i18next-vite'
import { PluginOptions } from 'tangl-i18next-vite'
TypeScript type import to avoid runtime bundle inclusion.

Basic Vite configuration integrating the tangl-i18next-vite plugin with two locales.

import { defineConfig } from 'vite'; import tanglI18nextVite from 'tangl-i18next-vite'; export default defineConfig({ plugins: [ tanglI18nextVite({ locales: ['en', 'es'], defaultLocale: 'en', sourceDir: 'src/locales', outDir: 'dist/locales', }), ], });
Debug
Known issues
breakingPlugin options structure changed in v1.2.0: 'locales' is now an array, not comma-separated string.
fix
Update your Vite config to pass locales as an array e.g., locales: ['en', 'es'].
affects: <1.2.0
deprecatedThe 'namespaces' option is deprecated in v1.1.0. Use 'locales' with nested folder structure instead.
fix
Remove 'namespaces' and reorganize locale files into subdirectories per namespace.
affects: >=1.1.0 <1.2.4
gotchaSource locale files must have a .json extension; otherwise, the plugin ignores them silently.
fix
Ensure all locale files are .json and located under sourceDir.
affects: >=0.1.0
gotchaWhen using TypeScript, the plugin type definitions are only bundled for ESM; CJS projects may need @ts-ignore or explicit type declarations.
fix
Set 'moduleResolution' to 'bundler' or 'node16' in tsconfig.json.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'tangl-i18next-vite' or its corresponding type declarations.
The package is not installed or TypeScript cannot resolve types for CJS.
fix
Install the package: npm install tangl-i18next-vite --save-dev; for type resolution issues, set 'moduleResolution': 'bundler' in tsconfig.
SyntaxError: Unexpected token 'export'
tangl-i18next-vite is ESM-only and cannot be require'd directly.
fix
Use dynamic import() or convert your project to ESM (set 'type': 'module' in package.json).
The requested module 'tangl-i18next-vite' does not provide an export named 'default'
Incorrect import syntax; the plugin expects a named import.
fix
Use import { tanglI18nextVite } from 'tangl-i18next-vite' instead of default import.
Plugin 'vite-plugin-i18n' (tangl-i18next-vite) threw an error: locales option must be an array
Passing locales as a comma-separated string (old API) instead of array.
fix
Change to locales: ['en', 'es'] per v1.2.0+ breaking change.
Upgrade
Version history
1.2.4latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
8
Amazon
1
Resources
tangl-i18next-vite — npm install tangl-i18next-vite · libregistry