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 cleanupIds field in HTMLNano and SVGO config #9374

Closed
wants to merge 1 commit into from

Conversation

grishy
Copy link
Contributor

@grishy grishy commented Nov 10, 2023

↪️ Pull Request

Found this in 2.10.2 version, we have some changes in cfg: https://github.com/svg/svgo/releases/tag/v3.0.0

cleanupIDs plugin is renamed to cleanupIds

Currently

In logs you can see:

...
You are trying to configure cleanupIDs which is not part of preset-default.
Try to put it before or after, for example

plugins: [
  {
    name: 'preset-default',
  },
  'cleanupIDs'
]
✨ Built in 4.02s

🚨 Test instructions

Build new project with svg inside.

✔️ PR Todo

@grishy
Copy link
Contributor Author

grishy commented Nov 10, 2023

You can test/temp fix it by creating for example .htmlnanorc.json or svgo cfg with fixed cleanupIds.
Example:

{
  "minifyJs": false,
  "minifyCss": false,
  "minifySvg": {
    "plugins": [
      {
        "name": "preset-default",
        "params": {
          "overrides": {
            "collapseGroups": false,
            "convertShapeToPath": false,

            "removeTitle": false,
            "removeDesc": false,
            "removeUnknownsAndDefaults": {
              "keepAriaAttrs": true,
              "keepRoleAttr": true
            },
            "cleanupIds": false
          }
        }
      },
      "removeXMLNS"
    ]
  }
}

@grishy
Copy link
Contributor Author

grishy commented Nov 10, 2023

Look like will be fixed by #9045

@grishy grishy closed this Nov 10, 2023
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.

1 participant