Disable PWA temporarily to test mobile Safari reload loops
All checks were successful
Build And Push Image / docker (push) Successful in 2m54s
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:
@@ -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);
|
||||
// }
|
||||
// }
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user