How to remove all comments with CSS Loader with webpack 2 in string mode?
问题 I use this config for my webpack 2 { test: /\.css$/i, use: ExtractTextPlugin.extract({ use: 'css-loader?minimize' }) } How to remove all comments based on string mode ? I use this but does not work 'css-loader?minimize&{discardComments:{removeAll:true}}' Can anyone help me ? 回答1: You could use optimize-css-assets-webpack-plugin to remove comments: example 回答2: Might as well keep going and add SASS in there also. Here is our config. const style_loader = ExtractTextPlugin.extract({ fallback: