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

Fix svgo example in readme #359

Merged
merged 2 commits into from
Sep 26, 2021

Conversation

maple3142
Copy link
Contributor

The usage are changed after #354: imagemin/imagemin-svgo@43888a0

@bdukes
Copy link

bdukes commented Sep 15, 2021

Note that the configuration documentation states:

The default preset of plugins is fully overridden if the plugins field is specified. Use preset-default plugin to customize plugins options.

So the default example may want to include that (or at least a note) so that folks don't think they're only altering one plugin when they're actually removing all of the default plugins.

Maybe this example:

svgo({
  plugins: [
    {
      name: "preset-default",
      params: { overrides: { removeViewBox: false, removeUselessDefs: false } },
    },
  ],
})

@bdukes
Copy link

bdukes commented Sep 15, 2021

So that other can find this when searching GitHub, the error you see when you're using the older SVGO config is

Plugin name should be specified

@sindresorhus sindresorhus merged commit a1579c0 into sindresorhus:main Sep 26, 2021
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

Successfully merging this pull request may close these issues.

None yet

3 participants