deps: migrate to svgo v4
Summary
Migrate to SVGO v4.
- SVGO is now an ESM module. (Common JS is still supported.)
- removeViewBox and removeTitle are no longer part of preset-default.
- we disabled removeViewBox to preserve scalability (can be enabled via SVGO config)
- we disabled removeTitle to preserve accessibility (can be enabled via SVGO config)
- Renames removeScriptElement to removeScripts (in v4.0.0-rc.1, we internally rewrite the old name to the new one, so this shouldn't be a breaking change for you, even if users were using this plugin)
- Introduces various bug fixes, optimizations, etc.
All recent release and changelogs can be seen in the repo: https://github.com/svg/svgo/releases
Changes
- When testing the SVGO config, enables removeTitle instead of disabling it, so that it's different from the default settings.
- Removes tests to disable removeViewBox as it's already disabled and the
override.removeViewBoxproperty is no longer part of the schema.
Breaking Changes
- Updates engine for Node.js to v16 as SVGO v4 dropped support for Node.js v14.
CI failure is due to Vercel dropping support for Node v16, so it's unable to deploy a preview.
The latest updates on your projects. Learn more about Vercel for Git ↗︎
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| svgr | ❌ Failed (Inspect) | May 6, 2025 9:46am |
svgp@4 has been released — are there any plans to resume this work? thanks for it!
svgp@4 has been released — are there any plans to resume this work? thanks for it!
Yes! I have a few more chores to do in SVGO. Once I'm caught up, I'll return to helping projects upgrade. I'll give extra attention to SVGR as I was invited to be a collaborator. :wink:
There may be a further delay though as it'll be important to document the changes and possibly even write a migration guide, but the documentation site is broken and can't deploy atm. So that'll need work too, but hopefully not much.
For now, I'd recommend sticking it out with the current latest release, but hopefully in the coming weeks this is something we'll tackle.
@SethFalco Bump! We need svgo 4 support, now that it is released. Thanks 🙏
@SethFalco is attempting to deploy a commit to the Greg Berg's projects Team on Vercel.
A member of the Team first needs to authorize it.