Files
plantillaNuxtAuthentikProxy/nuxt4/nuxt.config.ts
josedario87 d84f78ca2a
All checks were successful
build-and-deploy / build (push) Successful in 53s
build-and-deploy / deploy (push) Successful in 6s
Add PWA screenshots and window controls overlay
- Add screenshots to manifest (desktop, tablet, mobile)
- Enable window-controls-overlay for Windows compact mode
- Fix deprecated apple-mobile-web-app-capable warning
- Add mobile-web-app-capable meta tag
2025-10-13 00:39:30 -06:00

107 lines
2.7 KiB
TypeScript

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
modules: [
'@nuxt/ui',
'@nuxt/test-utils',
'@nuxt/image',
'@nuxt/eslint',
'@nuxt/content',
'@vite-pwa/nuxt'
],
css: ['~/assets/css/main.css'],
runtimeConfig: {
public: {
authentikUrl: process.env.NUXT_PUBLIC_AUTHENTIK_URL || 'https://authentik.nucleoriofrio.com'
}
},
pwa: {
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'apple-touch-icon.png', 'icon.svg'],
manifest: {
name: 'Plantilla Nuxt + Authentik',
short_name: 'NuxtAuth',
description: 'Plantilla de aplicación Nuxt 4 con autenticación mediante Authentik Proxy Outpost',
theme_color: '#00DC82',
background_color: '#ffffff',
display: 'standalone',
display_override: ['window-controls-overlay'],
orientation: 'portrait',
scope: '/',
start_url: '/',
icons: [
{
src: '/icon-192x192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any'
},
{
src: '/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any'
},
{
src: '/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable'
}
],
screenshots: [
{
src: '/screenshots/desktop-1.png',
sizes: '1280x720',
type: 'image/png',
form_factor: 'wide',
label: 'Pantalla principal en escritorio'
},
{
src: '/screenshots/tablet-1.png',
sizes: '768x1024',
type: 'image/png',
form_factor: 'narrow',
label: 'Pantalla principal en tablet'
},
{
src: '/screenshots/mobile-1.png',
sizes: '375x667',
type: 'image/png',
form_factor: 'narrow',
label: 'Pantalla principal en móvil'
}
]
},
workbox: {
navigateFallback: undefined,
globPatterns: ['**/*.{js,css,html,png,svg,ico}'],
cleanupOutdatedCaches: true,
runtimeCaching: [
{
urlPattern: /^https:\/\/authentik\.nucleoriofrio\.com\/.*/i,
handler: 'NetworkFirst',
options: {
cacheName: 'authentik-api-cache',
expiration: {
maxEntries: 10,
maxAgeSeconds: 60 * 60 * 24 // 24 hours
},
cacheableResponse: {
statuses: [0, 200]
}
}
}
]
},
devOptions: {
enabled: true,
type: 'module'
}
}
})