Answer the question
In order to leave comments, you need to log in
How to configure ImageMinimizerWebpackPlugin?
Hello I use this setup
const ImageMinimizerPlugin = require("image-minimizer-webpack-plugin");
const { extendDefaultPlugins } = require("svgo");
module.exports = defineConfig({
configureWebpack: (config) => {
config.plugins.push(
new ImageMinimizerPlugin({
minimizerOptions: {
plugins: [
[
"imagemin-svgo",
{
plugins: [
{
removeViewBox: false,
},
],
},
],
["nonstandard-imagemin-package-name", { myOptions: true }],
],
},
})
);
};
});
Module Warning (from ./node_modules/image-minimizer-webpack-plugin/dist/loader.js):
Unknown plugin: imagemin-svgo
Did you forget to install the plugin?
You can install it with:
$ npm install imagemin-svgo --save-dev
$ yarn add imagemin-svgo --dev
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question