SvgoPluginConfig

data class SvgoPluginConfig(val js2svg: SvgoPluginConfig.Js2SvgConfig = Js2SvgConfig(), val plugins: List<SvgoPlugin>)(source)

Platform-agnostic description of an SVGO configuration.

This is the single source of truth for all SVGO settings used across the project. Platform-specific code renders it to the appropriate format:

  • CLI path: toEsmModuleContent → JS module string for the svgo CLI

  • Browser path: toBrowserConfig() (jsMain) → dynamic JS object for svgo/browser

Constructors

Link copied to clipboard
constructor(js2svg: SvgoPluginConfig.Js2SvgConfig = Js2SvgConfig(), plugins: List<SvgoPlugin>)

Types

Link copied to clipboard
data class Js2SvgConfig(val pretty: Boolean = true)

Properties

Link copied to clipboard

output formatting options.

Link copied to clipboard

ordered list of SVGO plugins to apply.

Functions

Link copied to clipboard

Renders this SvgoPluginConfig as a browser-compatible dynamic JS object for the svgo/browser API.

Link copied to clipboard

Renders this SvgoPluginConfig as an ESM module string suitable for the svgo CLI's --config flag.