You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a0d2fe3
Browse filesBrowse the repository at this point in the historyBrowse files
authored
Pass file path to SVGO so prefixIds generates unique per-file prefixes (#17816)
* fix(assets): pass file path to SvgOptimizer so SVGO prefixIds generates unique prefixes
The `SvgOptimizer` interface and `svgoOptimizer()` did not forward the
file path to SVGO's `optimize()`. Plugins like `prefixIds` that derive
per-file values from the path fell back to a generic prefix, causing ID
collisions when multiple SVGs were inlined on the same page.
- Add `path` parameter to `SvgOptimizer.optimize` signature
- Forward `path` into SVGO config in `svgoOptimizer()`
- Pass `path` from `parseSvg()` to `svgOptimizer.optimize()`
Fixes#17728
* chore: add changeset
---------
Co-authored-by: astrobot-houston <[email protected]>
Co-authored-by: Matthew Phillips <[email protected]>
0 commit comments