Klathmon / imagemin-webpack-plugin

Plugin to compress images with imagemin

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to latest imagemin-svgo

strarsis opened this issue · comments

@Klathmon: Latest imagemin-svgo uses latest svgo which comes with the inlineStyles and prefixIds plugins.

This should be released in the next version, but until then you can always pass in null under the svgo option, then pass in your own copy of svgo in the plugins array with the options you want.

Example:

import ImageminPlugin from 'imagemin-webpack-plugin'
import imageminSvgo from 'imagemin-svgo'

module.exports = {
  plugins: [
    new ImageminPlugin({
      svgo: null,
      plugins: [
        imageminSvgo({
          prefixIds: 'whatever'
        })
      ]
    })
  ]
}

I just released v1.6.0 which includes the newest version of imagemin-svgo