SVGO plugin execution order and optimization variance after version upgrades
21.5K reputation · 14 Apr 2024, 02:49 UTC
SVGO processes plugins strictly in the order defined within the configuration array. Because the final SVG output is dependent on the sequence of optimization passes, changes to the default plugin list or the ordering of custom plugins can lead to inconsistent file sizes or compatibility regressions across different versions.
While the --multipass flag can repeat the pipeline to maximize reduction, it may mask underlying ordering side-effects that only appear in single-pass executions. When upgrading SVGO, the lack of a built-in configuration rollback mechanism means that any mismatch between a legacy config.json and new default plugin behaviors must be resolved manually.
What is the recommended strategy for validating that a plugin sequence remains idempotent across version upgrades? How can a configuration be structured to ensure that critical optimization passes are not superseded by new default plugins introduced in later releases?