local nuxt pwa workboxURL and modulePathPrefix

217 Views Asked by At

I try to use nuxt pwa but with local workboxURL and modulePathPrefix. There is a workbox-cdn

when is set that to

workbox: {
dev: isDev,
workboxURL: './node_modules/workbox-cdn/workbox/workbox-sw.js',
config: {
modulePathPrefix: './node_modules/workbox-cdn/workbox',
}
}

I get the error on not loading

Uncaught DOMException: Failed to execute 'importScripts' on 'WorkerGlobalScope': The script at 'http://localhost:3000/node_modules/workbox-cdn/workbox/workbox-sw.js' failed to load. at http://localhost:3000/sw.js:3:1

what is correct for workboxURL and modulePathPrefix ?

anyone?

0

There are 0 best solutions below