nuxt-community / imagemin-module

Automatically optimize (compress) all images used in Nuxt.js
MIT License
50 stars 1 forks source link

Error in Plugin name should be specified #28

Open CavalcanteLeo opened 3 years ago

CavalcanteLeo commented 3 years ago

as related here: https://github.com/webpack-contrib/image-minimizer-webpack-plugin/issues/190

but i'm only using '@nuxtjs/imagemin'

Captura de Tela 2021-03-23 às 12 17 20
ricardogobbosouza commented 3 years ago

Hi @CavalcanteLeo I will fix using https://github.com/webpack-contrib/image-minimizer-webpack-plugin/issues/190#issuecomment-801231993

FreekVR commented 3 years ago

Hi @ricardogobbosouza, any idea when the fix will be forthcoming? I was trying to work-around it by providing my own svgo settings, but due to #30 , I wasn't able to change the default settings.

tex0l commented 3 years ago

The way I fixed it is to do the following:

  imagemin: {
    minimizerOptions: {
      plugins: () => [
        ['gifsicle', { interlaced: true }],
        ['jpegtran', { progressive: true }],
        ['optipng', { optimizationLevel: 5 }],
        ['svgo', { plugins: [{ name: 'removeViewBox', active: false }] }]
      ]
    }
  },
baixiaoyu2997 commented 3 years ago

plugins: () => [ ['gifsicle', { interlaced: true }], ['jpegtran', { progressive: true }], ['optipng', { optimizationLevel: 5 }], ['svgo', { plugins: [{ name: 'removeViewBox', active: false }] }] ]

build success,but img size no change