I had the same issue, I was missing the service-worker.js
file when executing npm run build
.
The mistake I made was that I don't have a @vue/cli project, but a vite project and there is another plugin for that (vite-plugin-pwa
). Maybe that helps someone save the time I needed to find out.