From 55819d52e0f7cf2af498e5254deee72e17584ff7 Mon Sep 17 00:00:00 2001 From: Pooya Parsa Date: Tue, 3 Nov 2020 23:27:38 +0100 Subject: [PATCH] reload sw page after loading --- packages/nitro/src/targets/sw/index.html | 2 ++ 1 file changed, 2 insertions(+) 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) }) })