mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-23 14:15:13 +00:00
hide warns about plugins without a default export
partial fix for #1179
This commit is contained in:
parent
e29f439ff0
commit
080453586f
@ -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
|
||||
// --------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user