optimizilla-webpack-plugin
a webpack plugin to optimize images through optimizilla
Last updated 3 months ago by mattras82 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install optimizilla-webpack-plugin 
SYNC missed versions from official npm registry.

optimizilla-webpack-plugin

A Webpack 4 plugin to optimize & compress images through optimizilla. This is simply a wrapper of the optimizilla-cli tool to be used with webpack.

Installation

$ npm install -D optimizilla-webpack-plugin

Example Webpack Config

const optimizillaWebpackPlugin = require('optimizilla-webpack-plugin');

    //in your webpack plugins array
    module.exports = {
      plugins: [
          new optimizillaWebpackPlugin(
            ext: ['png', 'jpg', 'jpeg'],
            src: 'images'
          )
      ]
    }

Options

ext

Type: string[] | string

Default value: ['png', 'jpg', 'jpeg']

Array of file extensions to search for in the src directory.

src

Type: string

Default value: process.cwd()

The working directory path that the fast-glob searches in.

replace

Type: bool

Default value: true

Tells optimizilla-cli whether or not to replace the current files. When set to false, the tool will append "-min" to each filename.

Contributors

License

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

Current Tags

  • 2.0.3                                ...           latest (3 months ago)

6 Versions

  • 2.0.3                                ...           3 months ago
  • 2.0.2                                ...           5 months ago
  • 2.0.1                                ...           5 months ago
  • 2.0.0                                ...           5 months ago
  • 1.0.0                                ...           6 months ago
  • 0.1.0                                ...           6 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (2)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |