Closed
Description
v5.0.0 was a breaking change in that it was updated to depend on cssnano v4.0.2. However, this plugin was not updated to receive options per the PostCSS 6.x breaking change described by cssnano.
Please see https://cssnano.co/guides/presets/ for updated API details.
For example, attempt the following:
new OptimizeCSSAssetsPlugin({
cssProcessorOptions: { /* update API to receive a cssPluginOptions? */
preset: [
'default',
{
cssDeclarationSorter: false,
normalizeWhitespace: false
}
]
}
});
Result: declarations will still be sorted and whitespace will be compressed by cssnano 4.
Reference:
- https://github.com/postcss/postcss/blob/master/CHANGELOG.md#60-marquis-orias
- http://api.postcss.org/postcss.html#.plugin vs. https://github.com/NMFR/optimize-css-assets-webpack-plugin/blob/v5.0.0/src/index.js#L62 ... 2nd parameter is
processOptions
; 3rd parameter ispluginOptions
.
Metadata
Metadata
Assignees
Labels
No labels