I use workbox and I use these settings for generating service worker.
workbox-config.json
module.exports = {