Home

Awesome

react-app-rewire-imagemin-plugin

Add imagemin-webpack-plugin to a react-app-rewired config.

const rewireImageminPlugin = require('react-app-rewire-imagemin-plugin')

// Optimize images in the build
config = rewireImageminPlugin(config, env, {
  disable: process.env.NODE_ENV !== 'production',
  pngquant: {
    quality: '95-100'
  }
})