Next.js Discord

Discord Forum

Next 13 pages router + babel error with svg.

Answered
Rampur Greyhound posted this in #help-forum
Open in Discord
Rampur GreyhoundOP
Hi guys, I'm working on a project that I inherited... as per the title, Unsa Nextjs 13 with pages router... giving a quick look I notice this warning:
Warning: Invalid attribute name: `'data-name'`
    at svg
    at IconXYZ

I searched online for a solution and tried adding this to the babel configuration:
{
  "plugins": [
    [
      "inline-react-svg",
      {
        "svgo": {
          "plugins": [
            {
              "name": "removeAttrs", 
              "params": { "attrs": "(data-name)" }
            },
            "cleanupIDs"
          ]
        }
      }
    ]
  ]
}

but i have always the warning... someone can help me?
Answered by Rampur Greyhound
There were an error on svg
View full answer

1 Reply

Rampur GreyhoundOP
There were an error on svg
Answer