monacousa-portal/plugins/service-worker-cleanup.clie...

22 lines
860 B
TypeScript

// TEMPORARILY DISABLED FOR TESTING - PWA disabled, no service workers to unregister
// Plugin to unregister any existing service workers
export default defineNuxtPlugin(async () => {
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();
// }
// if (registrations.length > 0) {
// console.log('✅ All service workers unregistered');
// }
// } catch (error) {
// console.error('❌ Error unregistering service workers:', error);
// }
// }
});