Skip to main content

Module config

Module config 

Source
Expand description

Plugin configuration types.

These mirror the option objects produced on the JavaScript side (withIntlayer in next-intlayer, toSwcExtraCallers in @intlayer/config/callers, serializeFieldRenameMap in @intlayer/babel). Both sides must stay in sync.

Structs§

ExtraCallerConfig
Descriptor for a compat-adapter caller that the SWC plugin should recognise and rewrite in the same way as the native useIntlayer / getIntlayer calls (i.e. replace the string-key argument with a pre-imported dictionary object and swap the function name for a *Dictionary variant).
FieldRenameNode
A single entry of a FieldRenameMap.
NamespaceOptionConfig
Location of a namespace read from a property of an options-object argument, e.g. vue-i18n’s useI18n({ namespace: 'about' }).
PluginConfig
Configuration passed to the plugin via SWC transform options or constructed directly when using crate::process_transform from native Rust.

Enums§

LogLevel
Verbosity of the plugin’s build-time reporting.

Type Aliases§

FieldRenameMap
Rename table for one nesting level of a dictionary’s content: original field name → its short alias and the rename table of its own children.