@quasar/app-webpack
Version:
Quasar Framework App CLI with Webpack
15 lines (12 loc) • 415 B
JavaScript
const msgRE = /^(GenerateSW|InjectManifest) has been called multiple times/
const filterFn = warn => !(
warn.name === 'Error'
&& msgRE.test(warn.message) === true
)
module.exports.WorkboxWarningPlugin = class WorkboxWarningPlugin {
apply (compiler) {
compiler.hooks.done.tap('pwa-custom-sw-warning', stats => {
stats.compilation.warnings = stats.compilation.warnings.filter(filterFn)
})
}
}