Skip to content

Commit c19ebb9

Browse files
committed
Обновлено описание
1 parent 391db29 commit c19ebb9

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
11
# 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+
```

0 commit comments

Comments
 (0)