feat: improve service worker update notifications
- Added toast notifications for users when a new service worker version is available. - Updated service worker configuration to require manual activation for updates. - Enhanced user experience by allowing users to choose when to update the application.
This commit is contained in:
@@ -76,8 +76,8 @@ export default defineConfig({
|
||||
}
|
||||
],
|
||||
cleanupOutdatedCaches: true,
|
||||
clientsClaim: true,
|
||||
skipWaiting: true
|
||||
clientsClaim: true, // 新 SW 激活后立即接管
|
||||
skipWaiting: false // 不自动跳过等待,需要手动触发
|
||||
}
|
||||
})
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user