feb5f1f03b
- New BirNur.svelte: waqf configuration based on companions' model - Reframed Support.svelte with dual-track: bank trustee giving + app support - Updated App.svelte to add Waqf tab (tab 14) between WorshipTracker and Support - Model inspired by Uthman's Well of Rumah and Abdur Rahman bin Auf's productive endowment
51 lines
1.8 KiB
JavaScript
51 lines
1.8 KiB
JavaScript
import { defineConfig } from 'vite';
|
|
import { svelte } from '@sveltejs/vite-plugin-svelte';
|
|
import { VitePWA } from 'vite-plugin-pwa';
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
svelte(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
manifest: {
|
|
name: 'Nur Falah — Muslim Companion',
|
|
short_name: 'Nur Falah',
|
|
description: 'Prayer times, Quran, Qibla, and more — your daily Islamic companion',
|
|
theme_color: '#070A0D',
|
|
background_color: '#070A0D',
|
|
display: 'standalone',
|
|
orientation: 'portrait-primary',
|
|
icons: [
|
|
{ src: '/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/icon-512.png', sizes: '512x512', type: 'image/png' }
|
|
]
|
|
},
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,svg,png,woff2,ico}'],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^https:\/\/api\.alquran\.cloud\/.*/i,
|
|
handler: 'StaleWhileRevalidate',
|
|
options: { cacheName: 'quran-api', expiration: { maxEntries: 50, maxAgeSeconds: 86400 * 7 } }
|
|
},
|
|
{
|
|
urlPattern: /^https:\/\/unpkg\.com\/leaflet.*/i,
|
|
handler: 'CacheFirst',
|
|
options: { cacheName: 'leaflet-lib', expiration: { maxEntries: 5, maxAgeSeconds: 86400 * 30 } }
|
|
},
|
|
{
|
|
urlPattern: /^https:\/\/.*\.tile\.openstreetmap\.org\/.*/i,
|
|
handler: 'StaleWhileRevalidate',
|
|
options: { cacheName: 'osm-tiles', expiration: { maxEntries: 200, maxAgeSeconds: 86400 * 7 } }
|
|
},
|
|
{
|
|
urlPattern: /^https:\/\/cdn\.jsdelivr\.net\/npm\/tesseract\.js.*/i,
|
|
handler: 'CacheFirst',
|
|
options: { cacheName: 'tesseract', expiration: { maxEntries: 10, maxAgeSeconds: 86400 * 30 } }
|
|
}
|
|
]
|
|
}
|
|
})
|
|
]
|
|
});
|