2026-03-04 14:01:00 -05:00
|
|
|
import { defineConfig } from 'vite';
|
|
|
|
|
import react from '@vitejs/plugin-react';
|
|
|
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
|
|
|
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
plugins: [
|
|
|
|
|
react(),
|
|
|
|
|
VitePWA({
|
|
|
|
|
registerType: 'autoUpdate',
|
|
|
|
|
includeAssets: ['favicon.svg'],
|
|
|
|
|
manifest: {
|
2026-06-01 09:16:37 -04:00
|
|
|
name: 'App',
|
2026-03-04 14:01:00 -05:00
|
|
|
short_name: 'Méditation',
|
2026-06-01 09:16:37 -04:00
|
|
|
description: 'App — District 87-16',
|
2026-03-04 14:01:00 -05:00
|
|
|
theme_color: '#1a5276',
|
|
|
|
|
background_color: '#f8f9fa',
|
|
|
|
|
display: 'standalone',
|
|
|
|
|
orientation: 'portrait',
|
|
|
|
|
start_url: '/',
|
|
|
|
|
icons: [
|
|
|
|
|
{ src: '/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
|
|
|
{ src: '/icon-512.png', sizes: '512x512', type: 'image/png' },
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
workbox: {
|
2026-05-25 17:39:38 -04:00
|
|
|
cleanupOutdatedCaches: true,
|
|
|
|
|
clientsClaim: true,
|
|
|
|
|
skipWaiting: true,
|
2026-03-04 14:01:00 -05:00
|
|
|
globPatterns: ['**/*.{js,css,html,svg,png,woff2}'],
|
|
|
|
|
runtimeCaching: [
|
|
|
|
|
{
|
|
|
|
|
urlPattern: /\/api\//,
|
|
|
|
|
handler: 'NetworkFirst',
|
|
|
|
|
options: { cacheName: 'api-cache', networkTimeoutSeconds: 5 },
|
|
|
|
|
},
|
|
|
|
|
],
|
|
|
|
|
},
|
|
|
|
|
}),
|
|
|
|
|
],
|
|
|
|
|
server: {
|
|
|
|
|
proxy: { '/api': 'http://127.0.0.1:8000' },
|
|
|
|
|
},
|
|
|
|
|
});
|