File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1
1
# optimize-cssnano-plugin [ ![ Build Status] ( https://travis-ci.org/intervolga/optimize-cssnano-plugin.svg?branch=master )] ( https://travis-ci.org/intervolga/optimize-cssnano-plugin )
2
+
3
+ It will search for CSS assets during the Webpack build and minimize it with [ cssnano] ( http://github.com/ben-eb/cssnano ) .
4
+ Solves [ extract-text-webpack-plugin] ( http://github.com/webpack/extract-text-webpack-plugin ) CSS duplication problem.
5
+
6
+ Just like [ optimize-css-assets-webpack-plugin] ( http://github.com/NMFR/optimize-css-assets-webpack-plugin ) but more accurate with source maps.
7
+
8
+ ## Installation:
9
+
10
+ Using npm:
11
+ ``` shell
12
+ $ npm install --save-dev optimize-cssnano-plugin
13
+ ```
14
+
15
+ ## Configuration:
16
+
17
+ ``` javascript
18
+ var OptimizeCssnanoPlugin = require (' @intervolga/optimize-cssnano-plugin' );
19
+ module .exports = {
20
+ module: {
21
+ loaders: [
22
+ { test: / \. css$ / , loader: ExtractTextPlugin .extract (" style-loader" , " css-loader" ) }
23
+ ]
24
+ },
25
+ plugins: [
26
+ new ExtractTextPlugin (" styles.css" ),
27
+
28
+ new OptimizeCssnanoPlugin ()
29
+ ]
30
+ }
31
+ ```
You can’t perform that action at this time.
0 commit comments