service worker not being served on live (CF Pages) but is locally

Hi possibly not the right channel, but I'm working on a push notification system which works locally but not on live. Looking at these screenshots (live 1st then local), the script url of the service worker is different and the browser extension I have have is not picking up the SW on live deployment. Any idea why this could be...? SW should be loaded in nuxt.config.ts
modules: [
...
'@vite-pwa/nuxt',
],
pwa: {
registerType: 'autoUpdate',
manifest: {
...
icons: [
{
src: "img/prototype/maskable_icon_x192.png",
sizes: "192x192",
type: "image/png",
"purpose": "maskable any"
},
{
src: "img/prototype/apple-icon-x192.png",
sizes: "192x192",
type: "image/png",
"purpose": "maskable any"
},
{
src: "img/prototype/maskable_icon_x512.png",
sizes: "512x512",
type: "image/png",
"purpose": "maskable any"
},
],
},
workbox: {
navigateFallback: undefined,
importScripts: ['/sw.js'],
},
client: {
installPrompt: true,
},
devOptions: {
enabled: true,
type: "module",
},
},
modules: [
...
'@vite-pwa/nuxt',
],
pwa: {
registerType: 'autoUpdate',
manifest: {
...
icons: [
{
src: "img/prototype/maskable_icon_x192.png",
sizes: "192x192",
type: "image/png",
"purpose": "maskable any"
},
{
src: "img/prototype/apple-icon-x192.png",
sizes: "192x192",
type: "image/png",
"purpose": "maskable any"
},
{
src: "img/prototype/maskable_icon_x512.png",
sizes: "512x512",
type: "image/png",
"purpose": "maskable any"
},
],
},
workbox: {
navigateFallback: undefined,
importScripts: ['/sw.js'],
},
client: {
installPrompt: true,
},
devOptions: {
enabled: true,
type: "module",
},
},
No description
No description
No description
No description
3 Replies
Tincan
TincanOP8mo ago
Having said that, it appears a service worker is loaded here?
Tincan
TincanOP8mo ago
No description
Tincan
TincanOP8mo ago
but its still not working... Any ideas on what I can explore to figure this out guys? Pls appears to work now. I think removal of importscripts line was the issue. think it was double loading it and messing up
Want results from more Discord servers?
Add your server