You can minify css with optimize-css-assets-webpack-plugin, but by default some comments are left untouched. If you want to remove all comments you have to use an option for the cssnano, that is used as default for the compression of css.
Source code viewer
// npm install --save-dev optimize-css-assets-webpack-plugin const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); module.exports = { plugins: [ new OptimizeCssAssetsPlugin({ cssProcessorOptions: { safe: true, discardComments: { removeAll: true, }, }, }), ] }Programming Language: ECMAScript