From 49f1257709085559e43ecb81c92a56dfff21cfe0 Mon Sep 17 00:00:00 2001 From: Kyle Durand Date: Wed, 16 Aug 2023 12:13:22 -0400 Subject: [PATCH] Fix icon optimize config (#10087) This was causing quite a bit of output in build scripts. Adding a width and height to an icon then running yarn optimize confirms that this still works --- polaris-icons/svgo.config.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/polaris-icons/svgo.config.js b/polaris-icons/svgo.config.js index c61f1cb615f..4732a584467 100644 --- a/polaris-icons/svgo.config.js +++ b/polaris-icons/svgo.config.js @@ -1,6 +1,13 @@ module.exports = { plugins: [ - 'removeDimensions', + { + /** + * removeDimensions is set to true to remove width and height attributes from SVGs. + * This allows the SVG to scale to the size of its container, making it more responsive. + */ + name: 'removeDimensions', + active: true, + }, { name: 'preset-default', params: { @@ -11,12 +18,6 @@ module.exports = { */ removeViewBox: false, - /** - * removeDimensions is set to true to remove width and height attributes from SVGs. - * This allows the SVG to scale to the size of its container, making it more responsive. - */ - removeDimensions: true, - /** * The following 2 settings are disabled to reduce rendering inconsistency * on Android. Android uses a subset of the SVG spec called SVG Tiny: