Closed chbert closed 3 years ago
Was this only an issue with npm run dev
and not npm run build && npm run serve
?
I can comfirm it works with npm run build && npm run serve
but with npm run dev (or dev-dynamic) it gives the error.
(firefox)
It's because self.__WB_MANIFEST
doesn't get injected in 2.x, use 2.x-simplified instead or setup rollup-plugin-workbox
like it is in the 2.x-simplified branch.
But 2.x-simplified currently has another issue with service workers as the file doesn't get copied into the correct folder; you can manually fix this tho by moving the built serviceworker.js
file into /assets/
or /dist/
(where e.g. robots.txt
is at too).
I've updated 2x-simplified. The service worker should work now.
Mac OS X 10.15.7 Node 14.8.0
How to reproduce: