Files
whatsappNucleo/nuxt.config.ts
josedario87 e0f844e5dc
Some checks failed
Build and Deploy / build-and-deploy (push) Failing after 3m7s
fix: Corregir versiones de npm y imports ESM de Baileys
- Downgrade a Nuxt 3.14.0 (Nuxt 4 no existe todavía)
- Downgrade @nuxt/ui a ^3.0.0
- Downgrade Baileys a ^6.7.9 (versión estable)
- Corregir imports ESM de Baileys en auth-state.ts y manager.ts
- Remover compatibilityDate (específico de Nuxt 4)
2025-12-02 18:04:07 -06:00

103 lines
2.7 KiB
TypeScript

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
ssr: true,
devtools: { enabled: true },
css: ['~/assets/css/main.css'],
modules: ['@nuxt/image', '@nuxt/ui', '@vite-pwa/nuxt'],
// Performance optimizations
experimental: {
payloadExtraction: false
},
// Vite config
vite: {
server: {
hmr: {
clientPort: 443,
protocol: 'wss'
},
allowedHosts: [
'.nucleoriofrio.com',
'whatsapp.nucleoriofrio.com'
]
}
},
app: {
head: {
title: 'WhatsApp Nucleo',
link: [
{ rel: 'icon', type: 'image/png', href: '/icons/icon-192.png' },
{ rel: 'apple-touch-icon', sizes: '192x192', href: '/apple-touch-icon.png' },
{ rel: 'manifest', href: '/manifest.webmanifest' }
],
meta: [
{ name: 'theme-color', content: '#075e54' },
{ name: 'apple-mobile-web-app-capable', content: 'yes' },
{ name: 'mobile-web-app-capable', content: 'yes' },
{ name: 'apple-mobile-web-app-status-bar-style', content: 'black-translucent' }
]
}
},
nitro: {
experimental: {
openAPI: true
},
routeRules: {
'/manifest.webmanifest': {
headers: {
'Content-Type': 'application/manifest+json',
'Cache-Control': 'public, max-age=3600'
}
},
'/sw.js': {
headers: {
'Service-Worker-Allowed': '/',
'Cache-Control': 'public, max-age=0'
}
}
}
},
pwa: {
registerType: 'autoUpdate',
strategies: 'generateSW',
manifestFilename: 'manifest.webmanifest',
manifest: {
id: '/?app=whatsapp',
name: 'WhatsApp Nucleo',
short_name: 'WhatsApp',
description: 'Gestiona multiples instancias de WhatsApp desde un panel centralizado',
start_url: '/',
scope: '/',
display: 'standalone',
background_color: '#075e54',
theme_color: '#075e54',
icons: [
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' }
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,webp,ico,json,woff2}'],
navigateFallback: undefined,
cleanupOutdatedCaches: true
},
devOptions: {
enabled: false
}
},
runtimeConfig: {
// Server-side only
databaseUrl: process.env.DATABASE_URL || 'postgresql://whatsapp:password@localhost:5432/whatsapp',
masterApiKey: process.env.MASTER_API_KEY || '',
// Public (client + server)
public: {
authentikUrl: process.env.NUXT_PUBLIC_AUTHENTIK_URL || 'https://authentik.nucleoriofrio.com'
}
}
})