Files
plantillaNuxtAuthentikProxy/nuxt4/nuxt.config.ts
josedario87 ef28c74504
All checks were successful
build-and-deploy / build (push) Successful in 2m13s
build-and-deploy / deploy (push) Successful in 3s
Add PWA configuration and assets
- Install and configure @vite-pwa/nuxt module
- Generate app icons in multiple sizes (192x192, 512x512, 180x180)
- Create custom SVG icon with Nuxt + Authentik branding
- Configure PWA manifest with theme colors and display options
- Add Workbox service worker with caching strategies
- Include NetworkFirst caching for Authentik API
- Generate app store screenshots (mobile, tablet, desktop)
- Enable offline functionality and auto-updates

PWA Features:
- Installable on mobile and desktop
- Offline support with service worker
- Custom splash screens and icons
- Theme color: #00DC82 (Nuxt green)
- App name: Plantilla Nuxt + Authentik
2025-10-12 23:57:30 -06:00

82 lines
1.9 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',
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',
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'
}
]
},
workbox: {
navigateFallback: '/',
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'
}
}
})