diff --git a/packages/nitro/src/targets/sw/index.html b/packages/nitro/src/targets/sw/index.html index 1ee2757492..bea8875fee 100644 --- a/packages/nitro/src/targets/sw/index.html +++ b/packages/nitro/src/targets/sw/index.html @@ -10,8 +10,10 @@ window.addEventListener('load', () => { navigator.serviceWorker.register('/nuxt.sw.js').then((registration) => { console.log('ServiceWorker registration successful with scope:', registration.scope) + window.location.reload() }).catch(error => { console.error('ServiceWorker registration failed:', error) + document.write(error) }) })