A lot of warnings with webpack uglify

*爱你&永不变心* 提交于 2020-01-03 09:07:52

问题


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]

回答1:


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
    }
});


来源:https://stackoverflow.com/questions/35456949/a-lot-of-warnings-with-webpack-uglify

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!