I am the author of SVGR, a library to transform SVG into React Components. It offers build in support of SVGO.
SVGR can be run only in asynchronous mode today. But tomorrow we would like to be able to run it synchronously. It opens new possibility, like a Babel plugin for an example.
I would like to know if synchronous mode is an option for SVGO?
We are using an older version of svgo that works synchronously in a babel plugin, but we are getting a lot of people asking to update to a newer version because of a CVE (example). We are unable to update because the newer version cannot be used synchronously.
If it is helpful to contextualize this, here's how the babel plugin is currently using svgo: https://github.com/airbnb/babel-plugin-inline-react-svg/blob/759937bed41bd3d594ba2cc511a554e674283c15/src/optimize.js#L55-L70
@GreLI would you be open to exposing a method like optimizeSync from this package?
ping @GreLI
I've noticed some issues have auto issue closing bots, so consider this a wordy bump/+1
Most helpful comment
We are using an older version of svgo that works synchronously in a babel plugin, but we are getting a lot of people asking to update to a newer version because of a CVE (example). We are unable to update because the newer version cannot be used synchronously.
If it is helpful to contextualize this, here's how the babel plugin is currently using svgo: https://github.com/airbnb/babel-plugin-inline-react-svg/blob/759937bed41bd3d594ba2cc511a554e674283c15/src/optimize.js#L55-L70
@GreLI would you be open to exposing a method like
optimizeSyncfrom this package?