Ask your question and get a summary of the document by referencing this page and the AI provider of your choice
Version History
- "Updated exports index – proxy and compiler now bundled into intlayer(); added intlayerProxy, intlayerCompiler, intlayerMinify docs"v9.0.06/25/2026
- "Unified documentation for all exports"v8.0.01/21/2026
If you have an idea for improving this documentation, please feel free to contribute by submitting a pull request on GitHub.
GitHub link to the documentationCopy doc Markdown to clipboard
vite-intlayer Package
The vite-intlayer package provides a Vite plugin to integrate Intlayer into your Vite-based application. It handles dictionary compilation, dev-server watching, module aliases, locale-routing middleware, and build-time optimisations (tree-shaking, minification).
Installation
Copy the code to the clipboard
npm install vite-intlayerExports
Plugins
Import:
Copy the code to the clipboard
import { ... } from "vite-intlayer";Open the table in a modal to view all data content clearly
| Export | Description | Related Doc |
|---|---|---|
intlayer | Main Vite plugin. Prepares dictionaries, configures aliases, starts dev-server watchers, and (since v9) bundles the proxy and compiler. | intlayer |
intlayerPlugin | (Deprecated) Alias for intlayer. | intlayer |
intLayerPlugin | (Deprecated) Alias for intlayer. | intlayer |
intlayerProxy | Locale-routing middleware plugin (detection, redirect, rewrite). Since v9 it is bundled inside intlayer() – register separately only if needed. | intlayerProxy |
intlayerMiddleware | (Deprecated) Alias for intlayerProxy. | intlayerProxy |
intLayerMiddlewarePlugin | (Deprecated) Alias for intlayerProxy. | intlayerProxy |
intlayerCompiler | Extracts inline content declarations from components and writes them to dictionaries. Since v9 it is bundled inside intlayer(). | intlayerCompiler |
intlayerPrune | Tree-shakes unused dictionary fields from the production bundle. | intlayerPrune |
intlayerMinify | Minifies compiled dictionary JSON files and optionally mangles field names. | intlayerMinify |
Utilities
Open the table in a modal to view all data content clearly
| Export | Description | Related Doc |
|---|---|---|
createIntlayerProxyHandler | Returns a framework-agnostic Node.js (req, res, next) middleware with locale-routing logic. | intlayerProxy |
Types
Open the table in a modal to view all data content clearly
| Export | Description |
|---|---|
IntlayerPluginOptions | Options accepted by intlayer(). Extends GetConfigurationOptions with compatCallers and proxy. |
IntlayerProxyPluginOptions | Options accepted by intlayerProxy() and createIntlayerProxyHandler(). Includes ignore and configOptions. |
IntlayerCompilerOptions | Options accepted by intlayerCompiler(). Includes configOptions and compilerConfig. |
CompatCallerConfig | Re-export from @intlayer/babel. Describes a compat-adapter caller pattern for field-usage analysis. |