diff --git a/vite.config.js b/vite.config.js index 6d6044b..07f2602 100644 --- a/vite.config.js +++ b/vite.config.js @@ -62,6 +62,12 @@ export default defineConfig({ skipWaiting: true, // Force the waiting service worker to become the active service worker clientsClaim: true, // Take control of uncontrolled clients as soon as the service worker becomes active maximumFileSizeToCacheInBytes: 6000000, // 6MB + //Exclude API and Swagger routes from service worker navigation fallback + navigateFallback: '/index.html', + navigateFallbackDenylist: [ + /^\/api\//, // Exclude all API routes + /^\/swagger/, // Exclude all Swagger routes + ] }, }), ],