diff options
author | XhmikosR <xhmikosr@gmail.com> | 2021-10-17 09:02:13 +0300 |
---|---|---|
committer | Mark Otto <otto@github.com> | 2021-10-18 19:39:30 +0300 |
commit | 07e3904936d0fb0c146ad29149b7c1832f30571a (patch) | |
tree | 805c4a4452bd66c13afd623317ccc666dda69353 /svgo.config.js | |
parent | 082d5588b457869b79f6658572560ece10e88dc0 (diff) |
Fix svgo config
The `cleanupListOfValues`, `removeAttrs` and `sortAttrs` plugins are included in svgo but they are not in 'preset-default', so they need to be explicitly enabled.
Diffstat (limited to 'svgo.config.js')
-rw-r--r-- | svgo.config.js | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/svgo.config.js b/svgo.config.js index 3458e49b1..62bf8f654 100644 --- a/svgo.config.js +++ b/svgo.config.js @@ -6,24 +6,31 @@ module.exports = { pretty: true, indent: 2 }, - plugins: [{ - name: 'preset-default', - params: { - overrides: { - cleanupListOfValues: true, - removeAttrs: { - attrs: [ - 'data-name', - 'fill', - 'clip-rule' - ] - }, - removeUnknownsAndDefaults: { - keepRoleAttr: true - }, - removeViewBox: false, - sortAttrs: true + plugins: [ + { + name: 'preset-default', + params: { + overrides: { + removeUnknownsAndDefaults: { + keepRoleAttr: true + }, + removeViewBox: false + } + } + }, + // The next plugins are included in svgo but are not part of preset-default, + // so we need to enable them separately + 'cleanupListOfValues', + 'sortAttrs', + { + name: 'removeAttrs', + params: { + attrs: [ + 'clip-rule', + 'data-name', + 'fill' + ] } } - }] + ] } |