const path = require('path'); const {InjectManifest} = require('workbox-webpack-plugin'); module.exports = { mode: 'production', entry: './src/index.js', output: { path: path.resolve(__dirname, 'dist'), filename: 'index.bundle.js' }, plugins: [ new InjectManifest({ swSrc: './service-worker.js', swDest: 'service-worker.js', // Any other config if needed. }), ], };