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

Update to SVGO version 2.3.X #127

Closed
owensgit opened this issue Jul 15, 2021 · 0 comments
Closed

Update to SVGO version 2.3.X #127

owensgit opened this issue Jul 15, 2021 · 0 comments
Assignees

Comments

@owensgit
Copy link

The svgo package is now on version 2.3.X which introduces a new way of setting the config.

Instead of a JSON file, it's now a JS module.

Docs: https://github.com/svg/svgo#configuration

E.g.

module.exports = {
  plugins: [
    // enable a built-in plugin by name
    'builtinPluginName',
    // or by expanded version
    {
      name: 'builtinPluginName'
    },
    // some plugins allow/require to pass options
    {
      name: 'builtinPluginName',
      params: {
        optionName: 'optionValue'
      }
    }
  ]
}

svg-to-ts has a --svgoConfig option which looks for a JSON file. This should probably be updated to use the new module config instead.

E.g.

--svgoConfig svgo.config.js
@nivekcode nivekcode self-assigned this Oct 5, 2021
nivekcode added a commit that referenced this issue Oct 5, 2021
…ange

BREAKING CHANGE: svg-to-ts now ships with svgo 2. SVGO 2 has different syntax of passing
configuration. Furthermore we use the SVGO default object and dont introduce a custom fallback
anymore

#127
nivekcode pushed a commit that referenced this issue Oct 5, 2021
# [7.0.0](v6.0.2...v7.0.0) (2021-10-05)

### chore

* **(svgo) update svgo to v2:** update svgo to v2 - config object change ([688223e](688223e)), closes [#127](#127)

### BREAKING CHANGES

* **(svgo) update svgo to v2:** svg-to-ts now ships with svgo 2. SVGO 2 has different syntax of passing
configuration. Furthermore we use the SVGO default object and dont introduce a custom fallback
anymore
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants