Agregar mejoras de PWA: id único, launch_handler
All checks were successful
build-and-deploy / build-and-deploy (push) Successful in 2m16s

- Agregar id único (/?app=inicio) para identificar PWA
- Implementar launch_handler con navigate-existing para mantener una sola ventana
- Mejoras basadas en especificaciones actualizadas de Chrome for Developers
This commit is contained in:
2025-10-17 03:23:47 -06:00
parent 147fa4df32
commit c88b58aee8

View File

@@ -29,6 +29,7 @@ export default defineNuxtConfig({
registerType: 'autoUpdate', registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'icon.svg', 'offline.html'], includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'icon.svg', 'offline.html'],
manifest: { manifest: {
id: '/?app=inicio',
name: 'Perfil Nucleo', name: 'Perfil Nucleo',
short_name: 'Perfil', short_name: 'Perfil',
description: 'Gestiona tu perfil de usuario y accede a tus aplicaciones de Nucleo', description: 'Gestiona tu perfil de usuario y accede a tus aplicaciones de Nucleo',
@@ -41,6 +42,10 @@ export default defineNuxtConfig({
orientation: 'any', orientation: 'any',
scope: '/', scope: '/',
start_url: '/?source=pwa', start_url: '/?source=pwa',
// Control de ventanas - mantener una sola ventana al navegar
launch_handler: {
client_mode: 'navigate-existing'
},
// Capturar todos los enlaces que apunten a esta app // Capturar todos los enlaces que apunten a esta app
capture_links: 'existing-client-navigate', capture_links: 'existing-client-navigate',
// Extender scope a otros subdominios de Nucleo V3 // Extender scope a otros subdominios de Nucleo V3