diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-02-17 18:31:42 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-02-17 18:31:42 +0100 |
| commit | 8c3fc0f8df29f3fce8eb725926736a385f97fa39 (patch) | |
| tree | fcac7c9387422e06cf2580744b8db84186e86fa4 /config/webpack | |
| parent | d2cbd92a88e2560b94683c5e193edbb7c3cf9183 (diff) | |
build: update webpack config (imagemin)
Diffstat (limited to 'config/webpack')
| -rw-r--r-- | config/webpack/webpack.common.js | 44 |
1 files changed, 24 insertions, 20 deletions
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({ |
