From 1971c5e3ce36665bc9a00c9aab5dc0b6eb7a3bf7 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Sat, 25 Nov 2023 11:13:25 -0800 Subject: [PATCH] app: re-enable sw on localhost Signed-off-by: Varun Patil --- src/App.vue | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/App.vue b/src/App.vue index 53475df5..7b5f4a44 100644 --- a/src/App.vue +++ b/src/App.vue @@ -269,10 +269,7 @@ export default defineComponent({ }, async beforeMount() { - if (window.location.hostname === 'localhost') { - // Disable on dev instances - console.warn('Service Worker is not enabled on localhost.'); - } else if ('serviceWorker' in navigator) { + if ('serviceWorker' in navigator) { // Use the window load event to keep the page load performant window.addEventListener('load', async () => { try {