Running webpack -p
results in hundreds of dead code warnings for React code I'm pulling in from node_modules. Because I am using the define plugin, these are to be expected, but they make it difficult to find warnings being thrown regarding my own code.
Does anyone know of a way to silence warnings for code originating from node_modules? If not, is there any plan to implement such a feature?
:+1:, I too would like this feature.
You can use
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
},
})
but then, like you said, you'll miss warnings for your own code, too.
Sounds good. You can send a PR. Try to use warnings.test
warings.include
and warnings.exclude
.
hope this may help you @dubrowgn @wchargin
Most helpful comment
hope this may help you @dubrowgn @wchargin