hide warns about plugins without a default export

partial fix for #1179
This commit is contained in:
Pooya Parsa 2017-07-27 22:16:11 +04:30
parent e29f439ff0
commit 080453586f

View File

@ -116,6 +116,20 @@ export default function webpackBaseConfig ({ isClient, isServer }) {
) )
} }
// Workaround for hiding Warnings about plugins without a default export (#1179)
config.plugins.push({
apply (compiler) {
compiler.plugin('done', stats => {
stats.compilation.warnings = stats.compilation.warnings.filter(warn => {
if (warn.name === 'ModuleDependencyWarning' && warn.message.includes(`export 'default'`) && warn.message.includes('plugin')) {
return false
}
return true
})
})
}
})
// -------------------------------------- // --------------------------------------
// Dev specific config // Dev specific config
// -------------------------------------- // --------------------------------------