From d1c8a2eee7c25ff5dcd45d7cddd3c06c2f088013 Mon Sep 17 00:00:00 2001 From: Henning Orth Date: Mon, 28 May 2018 16:44:12 +0200 Subject: [PATCH 1/2] Tweaked SVGO settings Disable removal of the SVG viewBox by default to improve compatibility. See this Discourse thread: https://discourse.roots.io/t/svg-size-change-upon-yarn-build-production/12320 --- resources/assets/build/webpack.config.optimize.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/assets/build/webpack.config.optimize.js b/resources/assets/build/webpack.config.optimize.js index b71324c066..fd90620829 100644 --- a/resources/assets/build/webpack.config.optimize.js +++ b/resources/assets/build/webpack.config.optimize.js @@ -12,7 +12,11 @@ module.exports = { gifsicle: { optimizationLevel: 3 }, pngquant: { quality: '65-90', speed: 4 }, svgo: { - plugins: [{ removeUnknownsAndDefaults: false }, { cleanupIDs: false }], + plugins: [ + { removeUnknownsAndDefaults: false }, + { cleanupIDs: false }, + { removeViewBox: false } + ], }, plugins: [imageminMozjpeg({ quality: 75 })], disable: (config.enabled.watcher), From 9dd101f56ce050ff09eddf52a5774b2ca3324e4d Mon Sep 17 00:00:00 2001 From: Henning Orth Date: Mon, 28 May 2018 16:50:49 +0200 Subject: [PATCH 2/2] Fix travis CI build error (missing trailing comma) --- resources/assets/build/webpack.config.optimize.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/assets/build/webpack.config.optimize.js b/resources/assets/build/webpack.config.optimize.js index fd90620829..676525925c 100644 --- a/resources/assets/build/webpack.config.optimize.js +++ b/resources/assets/build/webpack.config.optimize.js @@ -15,7 +15,7 @@ module.exports = { plugins: [ { removeUnknownsAndDefaults: false }, { cleanupIDs: false }, - { removeViewBox: false } + { removeViewBox: false }, ], }, plugins: [imageminMozjpeg({ quality: 75 })],