svg / svgo

⚙️ Node.js tool for optimizing SVG files
https://svgo.dev/
MIT License
21.03k stars 1.39k forks source link

Explain `path: 'path-to.svg'` meaning #2068

Open MHillier98 opened 2 months ago

MHillier98 commented 2 months ago

The README says:

const result = optimize(svgString, {
  path: 'path-to.svg', // recommended
  multipass: true, // all other config fields are available here
});

But I can't seem to find any docs or explanation of what this path: 'path-to.svg' parameter does or why it's recommended. It would be helpful to know what this is exactly and why it's recommended :)

KTibow commented 2 months ago

I think it's only used in prefixIds to determine the prefix, but you can add your own plugins that may use it as context