Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A lot of warnings with webpack uglify

When I'm running webpack uglify plugin and I'm getting a lot of warnings from the stylus loader / css-loader. How can I resolve them? The webpack bundles it successfully.

   Condition always true [./~/style-loader!./~/css-loader!./~/stylus-loader!./app/<filename>.styl:10,0]
like image 630
Diogo Barroso Avatar asked Feb 17 '16 12:02

Diogo Barroso


1 Answers

That's normal -- by default Uglify tells you about the dead code that it strips out. If you don't want those "warnings" output, you can configure the plugin not to:

new Webpack.optimize.UglifyJsPlugin({ 
    compress: {
        warnings: false
    }
});
like image 194
Brendan Gannon Avatar answered Nov 04 '22 12:11

Brendan Gannon