pantoken / plugins/postcss/mangle-custom-props/src / MangleCustomPropsOptions
Interface: MangleCustomPropsOptions
Beta
Options for mangleCustomProps.
Properties
prefix?
optionalprefix?:string
Beta
Only custom property names that start with this string are mangled.
Default Value
"--instui-"
method?
optionalmethod?:MangleMethod
Beta
The algorithm used to generate short replacement names.
"base26"—--a,--b, …,--z,--aa,--ab, … (default; shortest for large sets)"base36"—--0,--1, …,--9,--a, …,--z,--10, … (alphanumeric)"numeric"—--0,--1,--2, …
Default Value
"base26"
propertyMap?
optionalpropertyMap?:boolean
Beta
When true, appends a mangle-map entry to PostCSS result.messages after processing. The message has shape { type: "mangle-map", plugin: "pantoken-mangle-custom-props", map: Map<string, string> }.
Default Value
false
sharedManifest?
optionalsharedManifest?:Map<string,string>
Beta
A mutable Map shared across multiple PostCSS passes.
On each pass the plugin reads existing entries (reusing their short names) and writes new ones (continuing the counter from sharedManifest.size). Pass the same Map instance to every mangleCustomProps or applyMinify call that processes CSS files which will be loaded together in the browser — this guarantees all files use an identical name mapping.
Process the token sheet first so its names are seeded into the manifest before the component sheets add their (typically overlapping) references.