Disable PWA temporarily to test mobile Safari reload loops
All checks were successful
Build And Push Image / docker (push) Successful in 2m54s

Temporarily comment out PWA module configuration and service worker
unregistration to debug reload loop issues on mobile Safari. Added
test documentation and console logging for debugging purposes.
This commit is contained in:
2025-08-10 16:25:05 +02:00
parent 8b05fdd3d7
commit e33f32e15a
3 changed files with 188 additions and 65 deletions

View File

@@ -1,19 +1,21 @@
// TEMPORARILY DISABLED FOR TESTING - PWA disabled, no service workers to unregister
// Plugin to unregister any existing service workers
export default defineNuxtPlugin(async () => {
if (process.client && 'serviceWorker' in navigator) {
try {
const registrations = await navigator.serviceWorker.getRegistrations();
console.log('🚫 Service worker unregistration plugin disabled (PWA testing)');
// if (process.client && 'serviceWorker' in navigator) {
// try {
// const registrations = await navigator.serviceWorker.getRegistrations();
for (const registration of registrations) {
console.log('🧹 Unregistering service worker:', registration.scope);
await registration.unregister();
}
// for (const registration of registrations) {
// console.log('🧹 Unregistering service worker:', registration.scope);
// await registration.unregister();
// }
if (registrations.length > 0) {
console.log('✅ All service workers unregistered');
}
} catch (error) {
console.error('❌ Error unregistering service workers:', error);
}
}
// if (registrations.length > 0) {
// console.log('✅ All service workers unregistered');
// }
// } catch (error) {
// console.error('❌ Error unregistering service workers:', error);
// }
// }
});