aboutsummaryrefslogtreecommitdiffstats
path: root/config/webpack/webpack.common.js
diff options
context:
space:
mode:
Diffstat (limited to 'config/webpack/webpack.common.js')
-rw-r--r--config/webpack/webpack.common.js44
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({