Nūr Phase 1: Prayer, Qibla, Quran, Hijri, Tasbih, 99 Names — Svelte PWA
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
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: 'Nūr — Muslim Companion',
|
||||
short_name: 'Nūr',
|
||||
description: 'Prayer times, Quran, Qibla, and more — your daily Islamic companion',
|
||||
theme_color: '#0f766e',
|
||||
background_color: '#f0fdfa',
|
||||
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 } }
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
]
|
||||
});
|
||||
Reference in New Issue
Block a user