Fix bug in warnings whitelist check

This commit is contained in:
Himanshu Mishra
2020-05-05 20:16:13 +09:00
parent a984c9cf22
commit b2b91013eb
@@ -34,7 +34,7 @@ class WebpackPluginFailBuildOnWarning {
if (warnings.length > 0) {
// Throw error if there are unexpected warnings.
for (let warning of warnings) {
if (warning.name in this.warningsWhitelist) {
if (!(warning.name in this.warningsWhitelist)) {
process.on('beforeExit', () => {
console.log(
`You have some unexpected warning(s) in your webpack build. Exiting process as error.`,