Fix svgo plugins

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-03-12 20:48:01 +00:00
parent 40a6a4296b
commit 97c3da3789
No known key found for this signature in database
GPG Key ID: A2B008A5F49F5D0D
2 changed files with 14 additions and 6 deletions

View File

@ -1,6 +0,0 @@
export default {
plugins: [
// generates a viewbox if missing
{ name: "removeDimensions" },
],
};

View File

@ -542,6 +542,20 @@ module.exports = (env, argv) => {
},
// props set on the svg will override defaults
expandProps: "end",
svgoConfig: {
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeViewBox: false,
},
},
},
// generates a viewbox if missing
{ name: "removeDimensions" },
],
},
/**
* Forwards the React ref to the root SVG element
* Useful when using things like `asChild` in