Fixing service worker URL
This commit is contained in:
parent
f3a2acdd7f
commit
7698901451
@ -1,7 +1,7 @@
|
|||||||
const setupServiceWorker = () => {
|
const setupServiceWorker = () => {
|
||||||
if ('serviceWorker' in navigator) {
|
if ('serviceWorker' in navigator) {
|
||||||
window.addEventListener('load', () => {
|
window.addEventListener('load', () => {
|
||||||
navigator.serviceWorker.register('/sw.js')
|
navigator.serviceWorker.register('/service-worker.js')
|
||||||
.then(registration => {
|
.then(registration => {
|
||||||
console.log('SW registered:', registration); // eslint-disable-line no-console
|
console.log('SW registered:', registration); // eslint-disable-line no-console
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user