From eeeac5fa3917c288d27a91aa70015f9d17732883 Mon Sep 17 00:00:00 2001 From: Jeremy Wharton Date: Thu, 13 Apr 2023 11:10:51 -0500 Subject: [PATCH] web/satellite: disable removal of SVG viewBox The webpack loader we use for SVGs uses an optimizer that strips the viewBox attribute by default in order to reduce the byte count. However, this prevents us from scaling SVGs using CSS. Because of this, viewBox removal has been disabled. Change-Id: I443eb83c762d3e0c84bb0fb6705e8f089d8a9405 --- web/satellite/vue.config.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/satellite/vue.config.js b/web/satellite/vue.config.js index 4bf3bb5dc..504f8c325 100644 --- a/web/satellite/vue.config.js +++ b/web/satellite/vue.config.js @@ -75,6 +75,11 @@ module.exports = { .loader('vue-loader') .end() .use('vue-svg-loader') - .loader('vue-svg-loader'); + .loader('vue-svg-loader') + .options({ + svgo: { + plugins: [{ removeViewBox: false }], + }, + }); }, };