I have the Webpack setup in which I use optimize-css-assets-webpack-plugin with cssnano as the CSS processor.
In there, I don't want to use the colormin
optimization.
Optimizations: https://cssnano.co/guides/optimisations
This is my current configuration which doesn't stop converting HSL value to hex:
plugins.push(new OptimizeCssAssetsPlugin({
assetNameRegExp: /\.css$/g,
cssProcessor: require('cssnano'),
cssProcessorPluginOptions: {
preset: ['default', {
discardComments: {
removeAll: true,
},
colormin: false,
}],
},
canPrint: true,
}));
I need to know whats wrong with this configuration.
Check the version of your optimize-css-assets-webpack-plugin and webpack. The last version of optimize-css-assets-webpack-plugin to support webpack 3 is version 3.2.0. And that version is configured differently: