From 27e84d195a9896d9dc9cfe67654fbdf5fca88676 Mon Sep 17 00:00:00 2001 From: David Mzareulyan <david@hiero.ru> Date: Thu, 10 Oct 2024 17:10:59 +0300 Subject: [PATCH] Don't use index.html fallback in service worker --- vite.config.mjs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/vite.config.mjs b/vite.config.mjs index d720e79eb..64ea8b250 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -67,12 +67,8 @@ export default defineConfig(({ mode }) => ({ ], }, workbox: { - // Don't use 'index.html' fallback for these routes - navigateFallbackDenylist: [ - /^\/(v\d+|socket\.io|api)\//, - /^\/(config\.json|version\.txt|robots\.txt)$/, - /^\/(docs|assets)\//, - ], + // Don't use 'index.html' fallback + navigateFallback: null, // Add '.woff2' and exclude (!) '.html' from the default 'globPatterns'. // We don't want to cache index.html because of beta/non-beta switching // and the possible config.json inclusion. So we only cache the assets