Skip to content
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

How to use removeAttrs #13

Open
phatsk opened this issue Dec 29, 2021 · 0 comments
Open

How to use removeAttrs #13

phatsk opened this issue Dec 29, 2021 · 0 comments

Comments

@phatsk
Copy link

phatsk commented Dec 29, 2021

I've attempted adding removeAttrs to my svgo settings, but I keep getting the following:

Warning: The plugin "removeAttrs" requires the "attrs" parameter.
It should have a pattern to remove, otherwise the plugin is a noop.
Config example:

plugins: [
  {
    name: "removeAttrs",
    params: {
      attrs: "(fill|stroke)"
    }
  }
]

Here is my call to svgVue:

    .svgVue({
        svgPath: 'resources/js/components/atomic/icons/',
        extract: false,
        svgoSettings: [
            { removeTitle: true },
            { removeViewBox: false },
            { removeDimensions: true },
            { removeUselessStrokeAndFill: true },
            { removeAttrs: { attrs: 'fill' } },
        ]
    })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant