47 lines
1.4 KiB
TypeScript
47 lines
1.4 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import path from 'path'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
includeAssets: ['favicon.ico', 'icons/*.png', 'images/*.png'],
|
|
manifest: {
|
|
name: 'MAIA',
|
|
short_name: 'MAIA',
|
|
description: 'Meeting AI Assistant — Gravação e análise inteligente de reuniões',
|
|
theme_color: '#2D6A4F',
|
|
background_color: '#0f172a',
|
|
display: 'standalone',
|
|
orientation: 'portrait',
|
|
start_url: '/',
|
|
icons: [
|
|
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' },
|
|
],
|
|
},
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
|
|
// Force clients to use new SW immediately on update
|
|
skipWaiting: true,
|
|
clientsClaim: true,
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^https?:\/\/.*\/api\//,
|
|
handler: 'NetworkFirst',
|
|
options: { cacheName: 'api-cache', networkTimeoutSeconds: 10 },
|
|
},
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: { '@': path.resolve(__dirname, './src') },
|
|
},
|
|
})
|