Socket
Socket
Sign inDemoInstall

@intervolga/optimize-cssnano-plugin

Package Overview
Dependencies
454
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @intervolga/optimize-cssnano-plugin

WebPack 2+ plugin for CSS minification after ExtractTextPluging


Version published
Weekly downloads
319K
increased by2.29%
Maintainers
1
Install size
12.3 MB
Created
Weekly downloads
 

Readme

Source

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,
          },
        }],
      },
    }),
	]
}

Keywords

FAQs

Last updated on 19 Jul 2018

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc