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

Implement preset-default plugin #1513

Merged
merged 12 commits into from
Aug 13, 2021
Merged

Implement preset-default plugin #1513

merged 12 commits into from
Aug 13, 2021

Conversation

TrySound
Copy link
Member

@TrySound TrySound commented Aug 9, 2021

I saw complaints about extendDefaultPlugins api

  • it cannot be used when svgo is installed globally
  • it requires svgo to be installed when using svgo-loader or svgo-jsx
  • it prevents using serializable config formats like json

In this diff I introduced the new plugin which is a bundle of all
default plugins. extendDefaultPlugins utility is deprecated.

module.exports = {
  plugins: [
    'preset-default',
    // or
    {
      name: 'preset-default',
      floatPrecision: 4,
      overrides: {
        convertPathData: {
          applyTransforms: false
        }
      }
    }
  ]
}

@TrySound TrySound changed the title Implement preset_default plugin Implement preset-default plugin Aug 10, 2021
@TrySound TrySound marked this pull request as ready for review August 12, 2021 17:17
I saw complaints about `extendDefaultPlugins` api

- it cannot be used when svgo is installed globally
- it requires svgo to be installed when using svgo-loader or svgo-jsx
- it prevents using serializable config formats like json

In this diff I introduced the new plugin which is a bundle of all
default plugins.

```js
module.exports = {
  plugins: [
    'preset_default',
    // or
    {
      name: 'preset_default',
      floatPrecision: 4,
      overrides: {
        convertPathData: {
          applyTransforms: false
        }
      }
    }
  ]
}
```
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.

2 participants