-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
fix(gatsby): postcss-svgo - remove plugin removeAttrs #33266
fix(gatsby): postcss-svgo - remove plugin removeAttrs #33266
Conversation
I don't think the CI failure is related to this PR though... It looks like other PRs have the exact same error. |
Better use preset-default instead of long list |
I am having this problem in my project after updating to gatsby 3, is there a way to fix it momentarily or should I wait for these changes to be released? Thanks
|
The package
The plugin is a noop without the {
"resolutions": {
"gatsby/**/svgo": "2.4.0"
}
} Unfortunately, with npm, it looks like a bit more complicated to do. There is a RFC for a similar feature than resolutions but it's not yet implemented AFAIK. You can probably edit the shrinkwrap to force a dedicated version (but I didn't test it). Hope that helps! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com> (cherry picked from commit a1f35ca)
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
Co-authored-by: gatsbybot <mathews.kyle+gatsbybot@gmail.com>
This PR removes the plugin
removeAttrs
forpostcss-svgo
. The main reason behind this change is to remove warnings while building a Gatsby site with SVGs (see below). TheremoveAttrs
plugin expect a pattern to remove matching attributes from the SVG, if none is provided the plugin is useless (see svg/svgo#1582).With the current version of
svgo
:With the "next" version (if the PR is merged):