Repository navigation
Export the baseline SVGO config so custom configs can extend it - #22
Merged
Merged
Conversation
A custom svgo config replaces the baseline config, but the README and the SvgJarOptions comment said it was deep-merged. Export baselineSvgoConfig so users can extend the baseline by copying its plugins, and correct the docs. The export is frozen so one caller cannot change the default for every build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A custom
svgoconfig replaces the baseline config. The README options and theSvgJarOptionscomment said it was deep-merged, which was wrong.What changed
baselineSvgoConfigis exported from@svg-jar/plugin. To keep the baseline and add plugins, copy its plugins into a custom config:The export is frozen, and its
pluginslist is typed as read-only, so one caller cannot change the default for every build.The README and
SvgJarOptionsdocs now say a custom config replaces the baseline. The README also explains why a config written without the baseline should keep thecleanupIdsoverride, because shortened IDs from different files can collide in one sprite sheet.The baseline is not merged automatically. With a merge, users could not remove baseline plugins, and changing a baseline setting would run
preset-defaulttwice.Tests
Unit tests check that the export matches the
svgo: truebehaviour, that it can be extended, that it cannot be changed, and that a custom config is used without the baseline.🤖 Generated with Claude Code