- Split icon-512x512.png into two separate entries - One with purpose 'any' and one with purpose 'maskable' - Avoids platform padding issues with combined purposes
100 lines
2.5 KiB
TypeScript
100 lines
2.5 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: '500x192',
|
|
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: '1920x1080',
|
|
type: 'image/png',
|
|
form_factor: 'wide',
|
|
label: 'Pantalla principal en escritorio'
|
|
},
|
|
{
|
|
src: '/screenshots/mobile-1.png',
|
|
sizes: '614x853',
|
|
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'
|
|
}
|
|
}
|
|
}) |