From 95431b0699938dd5a4ee6ee7f2b091504cca7ce0 Mon Sep 17 00:00:00 2001 From: Erudition Date: Mon, 18 Sep 2023 02:44:27 -0500 Subject: [PATCH] rename service worker to bust cache --- vite.config.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vite.config.ts b/vite.config.ts index 9dcb35fd..0cb29ea4 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -9,9 +9,12 @@ export default defineConfig({ // identify what plugins we want to use plugins: [ // PWA plugin causing import errors VitePWA({ registerType: 'autoUpdate', + // After messing with service worker you may need to rm -rf android/app/src/main/assets/* before sync. https://github.com/ionic-team/capacitor/issues/5430#issuecomment-1042990925 //devOptions: {enabled: true}, + filename: 'sw2.js', // useful if cache is sticky includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'masked-icon.svg'], workbox: { + //additionalManifestEntries: ["fallback.html"], // TODO test if this works //navigateFallbackDenylist: [/.js/], globPatterns: ['**/*.{html,css,ico,png,svg}'] // TODO removed js so capacitor plugins can work },