@intervolga/optimize-cssnano-plugin
WebPack 2+ plugin for CSS minification after ExtractTextPluging
Last updated 3 years ago by intervolga .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @intervolga/optimize-cssnano-plugin 
SYNC missed versions from official npm registry.

optimize-cssnano-plugin Build Status

It will search for CSS assets during the Webpack build and minimize it with cssnano. Solves extract-text-webpack-plugin CSS duplication problem.

Just like optimize-css-assets-webpack-plugin but more accurate with source maps.

Installation:

Using npm:

$ npm install --save-dev @intervolga/optimize-cssnano-plugin

Configuration:

const OptimizeCssnanoPlugin = require('@intervolga/optimize-cssnano-plugin');
module.exports = {
	module: {
		loaders: [
			{ test: /\.css$/, loader: ExtractTextPlugin.extract("style-loader", "css-loader") }
		]
	},
	plugins: [
    new ExtractTextPlugin("styles.css"),

    new OptimizeCssnanoPlugin({
      sourceMap: nextSourceMap,
      cssnanoOptions: {
        preset: ['default', {
          discardComments: {
            removeAll: true,
          },
        }],
      },
    }),
	]
}

Current Tags

  • 1.0.6                                ...           latest (2 years ago)

7 Versions

  • 1.0.6                                ...           2 years ago
  • 1.0.5                                ...           2 years ago
  • 1.0.4                                ...           3 years ago
  • 1.0.3                                ...           3 years ago
  • 1.0.2                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 353
This Week 42,737
This Month 131,982
Last Day 14,195
Last Week 79,858
Last Month 355,590
Dependencies (1)
Dev Dependencies (14)

Copyright 2014 - 2016 © taobao.org |