0👍
You may need workbox@v5 to modify the manifest.
Assuming using yarn, add resolutions
field in package.json
:
"resolutions": {
"@vue/cli-plugin-pwa/workbox-webpack-plugin": "^5.0.0"
},
Then run yarn
to install. And in your vue.config.js
:
module.exports = {
pwa: {
workboxOptions: {
exclude: ['index.html'],
additionalManifestEntries:[
{ url: '/index.html',revision: Date.now().toString() }
]
}
}
}
See also:
- https://github.com/vuejs/vue-cli/issues/5119#issuecomment-580144313
- https://github.com/GoogleChrome/workbox/issues/2243
If you don’t like workbox@v5, apparently you can modify precache manifest after build 🙂
Source:stackexchange.com