gulp.task('bundle-sw', () => { return wbBuild.generateSW({ cacheId: `dev-mind`, globDirectory: './build/dist', swDest: 'build/.tmp/sw.js', staticFileGlobs: ['**\/*.{js,html,css,png,jpg,json,gif,svg,webp,eot,ttf,woff,woff2,gz}'] clientsClaim: true }) .then(() => { console.log('Service worker generated.'); }) .catch((err) => { console.log('[ERROR] This happened: ' + err); }); });