const workbox = require('workbox-build'); const fs = require('fs'); let bundle_file = fs.readFileSync('./js/webpack/bundle.js', 'utf-8'); if (bundle_file.match(/ { console.log(`Generated service-worker, which will precache ${count} files, totaling ${(size/1e6).toFixed(2)} MB.`); });