Skip to content

Commit

Permalink
rename service worker to bust cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Erudition committed Sep 18, 2023
1 parent 39b2d2c commit 95431b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
Expand Down

0 comments on commit 95431b0

Please sign in to comment.