tinypng-webpack-plugin
a images compress plugin use with tinyPNG for webpack.
get tinyPNG key
Installation
$ npm install webpack-tinypng-compress --save-dev
Example Webpack Config
var tinypngCompress = ; //in your webpack plugins array moduleexports = plugins: key:"your tinyPNG key" relativePath: path //is relative path to output.puth
Usage
key: "your tinyPNG key" //can be Array, eg:['your key 1','your key 2'....] relativePath: path //is relative path to output.puth
Options Description
- key: Required, tinyPNG key
- relativePath: Required, to your img dir,relative to your webpack output path.
defaults Options
key:'' relativePath:'./'