Fix service worker caching index.html causing blank page
This commit is contained in:
@@ -14,7 +14,10 @@ export default defineConfig({
|
|||||||
'safari-pinned-tab.svg',
|
'safari-pinned-tab.svg',
|
||||||
'mstile-150x150.png',
|
'mstile-150x150.png',
|
||||||
],
|
],
|
||||||
injectManifest: true,
|
injectManifest: {
|
||||||
|
globPatterns: ['**/*.{js,css,html,png,svg}'],
|
||||||
|
globIgnores: ['index.html'],
|
||||||
|
},
|
||||||
manifest: {
|
manifest: {
|
||||||
name: 'Donetick: Simplify Tasks & Chores, Together.',
|
name: 'Donetick: Simplify Tasks & Chores, Together.',
|
||||||
short_name: 'Donetick',
|
short_name: 'Donetick',
|
||||||
@@ -55,6 +58,10 @@ export default defineConfig({
|
|||||||
background_color: '#ffffff',
|
background_color: '#ffffff',
|
||||||
display: 'standalone',
|
display: 'standalone',
|
||||||
},
|
},
|
||||||
|
workbox: {
|
||||||
|
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
|
||||||
|
},
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user