Skip to content

Commit

Permalink
Fix svgo config to always inline styles, so there can never be class …
Browse files Browse the repository at this point in the history
…name conflicts
  • Loading branch information
dumbmatter committed Apr 22, 2024
1 parent 999143a commit 1ffdd0f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tools/lib/process-svgs.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,15 @@ const processSVGs = async () => {
const contents = fs.readFileSync(path.join(subfolder, file), "utf8");
const result = await optimize(contents, {
multipass: true,
plugins: ["preset-default", "inlineStyles"],
plugins: [
"preset-default",
{
name: "inlineStyles",
params: {
onlyMatchedOnce: false,
},
},
],
});

// Replace <svg> and </svg> tags
Expand Down

0 comments on commit 1ffdd0f

Please sign in to comment.