Skip to content

Commit

Permalink
Fix svgo plugins
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Telatynski <[email protected]>
  • Loading branch information
t3chguy committed Mar 12, 2024
1 parent 40a6a42 commit 97c3da3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
6 changes: 0 additions & 6 deletions svgo.config.mjs

This file was deleted.

14 changes: 14 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 97c3da3

Please sign in to comment.