changing the vite config in an attempt to get the service worker to update for iOS devices
This commit is contained in:
parent
9a5e25908f
commit
982fdf85a4
1 changed files with 2 additions and 0 deletions
|
|
@ -12,6 +12,8 @@ export default defineConfig({
|
||||||
VitePWA({
|
VitePWA({
|
||||||
registerType: 'autoUpdate', // Automatically updates the service worker when a new version is available
|
registerType: 'autoUpdate', // Automatically updates the service worker when a new version is available
|
||||||
workbox: {
|
workbox: {
|
||||||
|
skipWaiting: true, //makes the new worker call skip waiting
|
||||||
|
clientsClaim: true, //makes it claim control of clients as soon as it activates
|
||||||
globPatterns: ['**/*.{js,css,html,png,jpg,svg}'], // Cache all common asset types
|
globPatterns: ['**/*.{js,css,html,png,jpg,svg}'], // Cache all common asset types
|
||||||
maximumFileSizeToCacheInBytes: 20 * 1024 * 1024, // 20 MiB
|
maximumFileSizeToCacheInBytes: 20 * 1024 * 1024, // 20 MiB
|
||||||
cleanupOutdatedCaches: true,
|
cleanupOutdatedCaches: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue