https://developers.google.com/web/tools/workbox/modules/workbox-webpack-plugin
InjectManifest Plugin
You can add the InjectManifest
plugin to your webpack config like so:
// Inside of webpack.config.js:
const {InjectManifest} = require('workbox-webpack-plugin');
module.exports = {
// Other webpack config...
plugins: [
// Other plugins...
new InjectManifest({
swSrc: './src/sw.js',
})
]
};