@quasar/app-webpack
Version:
Quasar Framework App CLI with Webpack
13 lines (10 loc) • 410 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)
})
}
}