Skip to content

Commit

Permalink
Make cssnano remove all comments (#11754)
Browse files Browse the repository at this point in the history
* Make cssnano remove all comments

As referenced by @jasmussen [here](#11752 (comment)), this should fix the fact that `/*` style comments are not removed by cssnano.

* Linting.
  • Loading branch information
Joost de Valk authored and youknowriad committed Nov 12, 2018
1 parent 6ec319c commit c2852c2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,11 @@ const config = {
if ( config.mode === 'production' ) {
return postcss( [
require( 'cssnano' )( {
preset: 'default',
preset: [ 'default', {
discardComments: {
removeAll: true,
},
} ],
} ),
] )
.process( content, { from: 'src/app.css', to: 'dest/app.css' } )
Expand Down

0 comments on commit c2852c2

Please sign in to comment.