JSPM

tinypng-compress

1.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 6
  • Score
    100M100P100Q42285F
  • License MIT

tinypng compress webpack

Package Exports

  • tinypng-compress

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tinypng-compress) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

tinypng-compress

a images compress plugin use with tinyPNG for webpack.

get tinyPNG key

link

Installation

$ npm install tinypng-compress --save-dev

Example Webpack Config

var tinypngCompress = require('tinypng-compress');

    //in your webpack plugins array
    module.exports = {
        plugins: [
            new tinypngCompress()
        ]
    }

编译提示

默认在process.env.NODE_ENV = production开启此功能,编译所有webpack assets的图片资源(gif、jpg、jpeg、png)。

License

http://www.opensource.org/licenses/mit-license.php