50 lines
1.4 KiB
TypeScript
50 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'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
react(),
|
|
tailwindcss(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
workbox: {
|
|
skipWaiting: true,
|
|
clientsClaim: true,
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /\/storage\/v1\/object\/public\//,
|
|
handler: 'CacheFirst',
|
|
options: {
|
|
cacheName: 'wetalk-supabase-assets',
|
|
expiration: { maxEntries: 100, maxAgeSeconds: 30 * 24 * 60 * 60 },
|
|
cacheableResponse: { statuses: [0, 200] },
|
|
},
|
|
},
|
|
],
|
|
},
|
|
includeAssets: ['favicon.svg', 'icons/*.png'],
|
|
manifest: {
|
|
name: 'We Talk',
|
|
short_name: 'WeTalk',
|
|
description: 'Podcast communautaire — écoutez, créez, partagez.',
|
|
theme_color: '#4A90D9',
|
|
background_color: '#FAFAF8',
|
|
display: 'standalone',
|
|
start_url: '/',
|
|
icons: [
|
|
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
|
|
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': '/src',
|
|
},
|
|
},
|
|
})
|