-
-
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
Run plugins in a predefined order #2085
Comments
Is updating your config an option here? You should be able to just move around the plugins in your config to match your preferred order. |
For sure, but given that there exists an ideal order, I think it makes sense to use that by default rather than leave it to the user? |
So you think the order of plugins in |
Not just the preset, but any given set of plugins should run in an ideal order. if you check out the example I gave, it demonstrates that some plugins should always run before others to produce an optimal output |
That's a breaking change, and IMO a breaking change that doesn't make any sense |
Not sure what’s not making sense? And besides, being a breaking change is fine if it’s part of a major release? If it would be helpful for me to look into it more than just the one example I’ve found, I can certainly do so. If it’s something that’s not worth it for the project, all good too, just a suggestion :) |
Well SVGO is a composition of plugins, and right now, they act like a pipeline. This makes it easy to change the order of plugins or add custom plugins. Even if you changed it to be more like toggles, that would just hide the underlying pipeline. I feel like the problems here would be better addressed by updating whatever pipeline is being ran rather than changing how plugins are specified, but that's just the opinion of this random guy who watches this repo. |
Is your feature request related to a problem? Please describe.
Certain plugins perform better based on a prior plugin. Consider the following
convertPathData
, thenconvertShapeToPath
Describe the solution you'd like
Right now the order plugins are run in is in the order provided in the config, however this can be suboptimal.
For example, it makes sense to run
convertShapeToPath
beforeconvertPathData
.Describe alternatives you've considered
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: