I want to change the name of the generated service worker. The default sw.js to service-worker.js, and all the workflow to look for the new service work URL at /service-worker.js.
On a different note, I had a different app register as service-worker.js. I plan to have the nuxt app on the same domain. I explored few options, but it didn't work out:
The default sw.jsdoesn't take over.
I tried using enabled: false so that old service worker from previous app would be deleted, but it doesn't.
I manually renamed sw.js to service-worker.js, which overrides the old one. But all subsequent reloads still search for sw.js.
I want to change the name of the generated service worker. The default
sw.js
toservice-worker.js
, and all the workflow to look for the new service work URL at/service-worker.js
.On a different note, I had a different app register as
service-worker.js
. I plan to have the nuxt app on the same domain. I explored few options, but it didn't work out:sw.js
doesn't take over.enabled: false
so that old service worker from previous app would be deleted, but it doesn't.sw.js
toservice-worker.js
, which overrides the old one. But all subsequent reloads still search forsw.js
.