// Plugin to unregister any existing service workers export default defineNuxtPlugin(async () => { 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(); } if (registrations.length > 0) { console.log('โœ… All service workers unregistered'); } } catch (error) { console.error('โŒ Error unregistering service workers:', error); } } });