From 0617e8b48557dad54bfd4f91d4ac7271186513bb Mon Sep 17 00:00:00 2001 From: sylenien Date: Tue, 17 May 2022 11:16:49 +0200 Subject: [PATCH] fix(ui): fix icons generation script to properly trim svg attrs --- frontend/scripts/icons.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frontend/scripts/icons.js b/frontend/scripts/icons.js index 923426dd6..49c4459b9 100644 --- a/frontend/scripts/icons.js +++ b/frontend/scripts/icons.js @@ -8,8 +8,7 @@ const ICONS_DIRNAME = 'app/svg/icons'; const UI_DIRNAME = 'app/components/ui'; const svgo = new SVGO({ plugins: [ - //"width", "height", <- sometimes eating useful attrs from icons and break them - { removeAttrs: { attrs: [ "class", "data-name", "dataName" ] } }, + { removeAttrs: { attrs: [ "class", "data-name", "dataName", "svg:width", "svg:height" ] } }, { addAttributesToSVGElement: { attributes: [ "width={ `${ width }px` }", "height={ `${ height }px` }" ] } }, { convertPathData: true }, // ? { removeViewBox: false }, // ?