-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Synchronous mode #1015
Comments
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 |
ping @GreLI |
I've noticed some issues have auto issue closing bots, so consider this a wordy bump/+1 |
Ref #1015 Looks like `sax` is synchronous and we do not need to listen "end" event. This allows to avoid all callbacks and make `optimize` method synchronous.
Ref #1015 Looks like `sax` is synchronous and we do not need to listen "end" event. This allows to avoid all callbacks and make `optimize` method synchronous.
API is synchronous in v2 |
@TrySound thank you! |
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?
The text was updated successfully, but these errors were encountered: