sw building seem to be working fine now?
This commit is contained in:
parent
8824049f28
commit
fead727d78
4 changed files with 9 additions and 164 deletions
|
|
@ -18,8 +18,9 @@ function isPushSupported() {
|
|||
function getOrCreateServiceWorker() {
|
||||
if (!isSWSupported()) return
|
||||
const swType = process.env.HAS_MODULE_SERVICE_WORKER ? 'module' : 'classic'
|
||||
return navigator.serviceWorker
|
||||
.register(import.meta.env.MODE === 'production' ? '/sw-pleroma.js' : '/dev-sw.js?dev-sw', { type: swType })
|
||||
return navigator
|
||||
.serviceWorker
|
||||
.register('/sw-pleroma.js', { type: swType })
|
||||
.catch((err) =>
|
||||
console.error('Unable to get or create a service worker.', err),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue