Browse Source

Add imagemin-webp

develop
Alice Gaudon 1 week ago
parent
commit
938e8b4ebb
2 changed files with 4 additions and 2 deletions
  1. +1
    -0
      package.json
  2. +3
    -2
      webpack.config.js

+ 1
- 0
package.json View File

@ -44,6 +44,7 @@
"imagemin-mozjpeg": "^9.0.0",
"imagemin-pngquant": "^9.0.2",
"imagemin-svgo": "^9.0.0",
"imagemin-webp": "^6.0.0",
"jest": "^27.0.4",
"maildev": "^1.1.0",
"mini-css-extract-plugin": "^1.2.1",


+ 3
- 2
webpack.config.js View File

@ -1,7 +1,7 @@
const path = require('path');
const MiniCssExtractPlugin = require('mini-css-extract-plugin');
const ImageMinimizerPlugin = require("image-minimizer-webpack-plugin");
const { extendDefaultPlugins } = require("svgo");
const {extendDefaultPlugins} = require("svgo");
const TerserPlugin = require('terser-webpack-plugin');
const dev = process.env.NODE_ENV === 'development';
@ -84,6 +84,7 @@ const config = {
["gifsicle", {}],
["mozjpeg", {}],
["pngquant", {}],
["webp", {quality: 90}],
// Svgo configuration here https://github.com/svg/svgo#configuration
[
"svgo",
@ -96,7 +97,7 @@ const config = {
{
name: "addAttributesToSVGElement",
params: {
attributes: [{ xmlns: "http://www.w3.org/2000/svg" }],
attributes: [{xmlns: "http://www.w3.org/2000/svg"}],
},
},
]),


Loading…
Cancel
Save