Skip to content

Commit

Permalink
Don't use index.html fallback in service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmz committed Oct 10, 2024
1 parent 1ecb21a commit 27e84d1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 27e84d1

Please sign in to comment.