Skip to content

Commit d2fdf59

Browse files
authored
update doc for cssProcessorPluginOptions
1 parent a240fd5 commit d2fdf59

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ The plugin can receive the following options (all of them are optional):
2525
* assetNameRegExp: A regular expression that indicates the names of the assets that should be optimized \ minimized. The regular expression provided is run against the filenames of the files exported by the ExtractTextPlugin instances in your configuration, not the filenames of your source CSS files. Defaults to `/\.css$/g`
2626
* cssProcessor: The CSS processor used to optimize \ minimize the CSS, defaults to [cssnano](http://github.com/ben-eb/cssnano). This should be a function that follows cssnano.process interface (receives a CSS and options parameters and returns a Promise).
2727
* cssProcessorOptions: The options passed to the cssProcessor, defaults to `{}`
28+
* cssProcessorPluginOptions: The plugin options passed to the cssProcessor, defaults to `{}`
2829
* canPrint: A boolean indicating if the plugin can print messages to the console, defaults to `true`
2930

3031
## Example:
@@ -45,7 +46,9 @@ module.exports = {
4546
new OptimizeCssAssetsPlugin({
4647
assetNameRegExp: /\.optimize\.css$/g,
4748
cssProcessor: require('cssnano'),
48-
cssProcessorOptions: { discardComments: { removeAll: true } },
49+
cssProcessorPluginOptions: {
50+
preset: ['default', { discardComments: { removeAll: true } }],
51+
},
4952
canPrint: true
5053
})
5154
]

0 commit comments

Comments
 (0)