Skip to content

Commit

Permalink
fix(io): modify svgo config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Apr 17, 2023
1 parent 1bf438a commit 032a6b8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion icons/io/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
!tsconfig.json
!package.json
!data
!README.md
!README.md
!svgo.config.js
21 changes: 21 additions & 0 deletions icons/io/svgo.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

/** @type {import('svgo').Config} */
module.exports = {
multipass: true,
js2svg: {
indent: 2, // string with spaces or number of spaces. 4 by default
pretty: true, // boolean, false by default
},
plugins: [
'removeComments',
'removeDimensions',
'cleanupAttrs',
{
name: 'removeAttrs',
fn: (ast, params, info) => {
delete ast.children[0]?.attributes['style'];
delete ast.children[0]?.attributes['xml:space'];
},
}
]
}

0 comments on commit 032a6b8

Please sign in to comment.