Next Plugin: WithPalamedesOptions
Functions, types, and exports for Next Plugin: WithPalamedesOptions.
Page outline
import type { WithPalamedesOptions } from "@palamedes/next-plugin"
type WithPalamedesOptions = {
/**
* Files to transform: a glob, a RegExp, or an array of both. Relative globs
* resolve from `projectRoot`; RegExps test the absolute file path.
* @default /\.([cm]?[jt]s|[jt]sx)$/
*/
include?: PalamedesFilterPattern;
/**
* Files to skip, with the same pattern rules as `include`.
* @default /node_modules/
*/
exclude?: PalamedesFilterPattern;
/**
* Enable .po file compilation loader.
* @default true
*/
enablePoLoader?: boolean;
/**
* Path to a Palamedes config file.
* Relative paths resolve from the Next project root. If not provided,
* Palamedes searches for config automatically from that root.
*/
configPath?: string;
/**
* Absolute or relative Next project directory. Set this when Next's project
* directory cannot be derived automatically, for example in a custom host.
*/
projectRoot?: string;
/**
* If true, fail compilation on missing translations.
* @default false
*/
failOnMissing?: boolean;
/**
* Advanced override for the module that exports the runtime getter.
* @default "@palamedes/runtime"
*/
runtimeModule?: string;
/**
* Include authored source messages as diagnostic source metadata.
* Defaults to `false` in every environment. Set to `true` to include
* authored source text in generated calls for diagnostics.
* V2 runtime misses throw; this metadata never provides replacement output.
*/
includeSourceMetadata?: boolean;
/**
* Monorepo workspace root to use for Turbopack and output file tracing.
* If omitted, Palamedes will try to detect a workspace root from the Next
* project root.
*/
workspaceRoot?: string;
/**
* Initialize request-local i18n at the start of every recognized Next.js
* Server Function. Requires a `palamedes.server` entry module exporting
* `initializeServerFunctionI18n`.
*
* Automatically enabled when the conventional entry exists.
*/
serverFunctions?: boolean;
};
Properties
| Name | Type | Required | Description |
|---|---|---|---|
include | PalamedesFilterPattern | No | Files to transform: a glob, a RegExp, or an array of both. Relative globs resolve from projectRoot; RegExps test the absolute file path. Default: /\.([cm]?[jt]s|[jt]sx)$/. |
exclude | PalamedesFilterPattern | No | Files to skip, with the same pattern rules as include. Default: /node_modules/. |
enablePoLoader | boolean | No | Enable .po file compilation loader. Default: true. |
configPath | string | No | Path to a Palamedes config file. Relative paths resolve from the Next project root. If not provided, Palamedes searches for config automatically from that root. |
projectRoot | string | No | Absolute or relative Next project directory. Set this when Next's project directory cannot be derived automatically, for example in a custom host. |
failOnMissing | boolean | No | If true, fail compilation on missing translations. Default: false. |
runtimeModule | string | No | Advanced override for the module that exports the runtime getter. Default: "@palamedes/runtime". |
includeSourceMetadata | boolean | No | Include authored source messages as diagnostic source metadata. Defaults to false in every environment. Set to true to includeauthored source text in generated calls for diagnostics. V2 runtime misses throw; this metadata never provides replacement output. |
workspaceRoot | string | No | Monorepo workspace root to use for Turbopack and output file tracing. If omitted, Palamedes will try to detect a workspace root from the Next project root. |
serverFunctions | boolean | No | Initialize request-local i18n at the start of every recognized Next.js Server Function. Requires a palamedes.server entry module exportinginitializeServerFunctionI18n.Automatically enabled when the conventional entry exists. |
Last updated: November 1, 2026