本文介绍了很多webpack的警告uglify的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

当我运行webpack uglify插件时,我收到了来自stylus loader / css-loader的许多警告。我该如何解决它们? webpack将其成功捆绑。

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]


推荐答案

这很正常 - 默认情况下,Uglify会告诉您关于它被去掉的死代码。如果你不想要这些警告输出,你可以配置插件不要:

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

这篇关于很多webpack的警告uglify的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 13:20