From 8c3fc0f8df29f3fce8eb725926736a385f97fa39 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 17 Feb 2022 18:31:42 +0100 Subject: build: update webpack config (imagemin) --- config/webpack/webpack.common.js | 44 ++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 20 deletions(-) (limited to 'config/webpack/webpack.common.js') diff --git a/config/webpack/webpack.common.js b/config/webpack/webpack.common.js index 69ecd2f..c2155e9 100644 --- a/config/webpack/webpack.common.js +++ b/config/webpack/webpack.common.js @@ -67,29 +67,33 @@ module.exports = { }, plugins: [ new ImageMinimizerPlugin({ - minimizerOptions: { - plugins: [ - ['gifsicle', { interlaced: true }], - ['mozjpeg', { progressive: true, quality: 75 }], - ['optipng', { optimizationLevel: 5 }], - [ - 'svgo', - { - plugins: [ - { - name: 'preset-default', - params: { - overrides: { - removeTitle: false, - removeViewBox: false, + minimizer: { + implementation: ImageMinimizerPlugin.imageminMinify, + options: { + plugins: [ + ['gifsicle', { interlaced: true }], + ['mozjpeg', { progressive: true, quality: 75 }], + ['optipng', { optimizationLevel: 5 }], + // Svgo configuration here https://github.com/svg/svgo#configuration + [ + 'svgo', + { + plugins: [ + { + name: 'preset-default', + params: { + overrides: { + removeTitle: false, + removeViewBox: false, + }, }, }, - }, - 'removeDimensions', - ], - }, + 'removeDimensions', + ], + }, + ], ], - ], + }, }, }), new CopyPlugin({ -- cgit v1.2.3