Skip to content

Commit

Permalink
Replaced the inline SVGO configuration with a config file that is com…
Browse files Browse the repository at this point in the history
…patible with SVGO@3
  • Loading branch information
l-alexandrov committed Mar 9, 2023
1 parent 1201bca commit 7fabc50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/OptimizerChainFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static function create(array $config = []): OptimizerChain
]))

->addOptimizer(new Svgo([
'--disable={cleanupIDs,removeViewBox}',
'--config=svgo.config.js',
]))

->addOptimizer(new Gifsicle([
Expand Down
13 changes: 13 additions & 0 deletions svgo.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = {
plugins: [
{
name: 'preset-default',
params: {
overrides: {
cleanupIDs: false,
removeViewBox: false,
},
},
},
],
};

0 comments on commit 7fabc50

Please sign in to comment.