Applying this change:
'/service-worker.js' // ❌
'./service-worker.js' // ✅
fixed my issue.
(in navigator.serviceWorker.register('/service-worker.js')
)
Or maybe you need:
'%PUBLIC_URL%/serviceworker.js'
Thank @DanielLord for his comment.
Applying this change:
'/service-worker.js' // ❌
'./service-worker.js' // ✅
fixed my issue.
(in navigator.serviceWorker.register('/service-worker.js')
)
Or maybe you need:
'%PUBLIC_URL%/serviceworker.js'
Thank @DanielLord for his comment.