Files
TasGrid/vite.config.ts
T
tcardoza 6a963a32fd
CI / build (push) Has been skipped
CI / deploy_prod (push) Successful in 1m19s
CI / deploy_dev (push) Has been skipped
Added custom PWA reloading - 10 minutes of idle or when moved to the background or when loading initially or manually with the new button in settings
2026-03-04 19:29:18 -06:00

75 lines
1.8 KiB
TypeScript

import { defineConfig } from 'vite'
import solid from 'vite-plugin-solid'
import { VitePWA } from 'vite-plugin-pwa'
import tailwindcss from '@tailwindcss/vite'
import path from 'path'
export default defineConfig({
plugins: [
solid(),
tailwindcss(),
VitePWA({
registerType: 'prompt',
includeAssets: ['icon.webp', 'vite.svg'],
manifest: {
name: 'Tasgrid',
short_name: 'Tasgrid',
description: 'Precision Productivity Task Manager',
theme_color: '#0a0a0a',
background_color: '#0a0a0a',
display: 'standalone',
icons: [
{
src: 'icon.webp',
sizes: '1024x1024',
type: 'image/webp',
purpose: 'any'
},
{
src: 'icon.webp',
sizes: '192x192',
type: 'image/webp',
purpose: 'maskable'
},
{
src: 'icon.webp',
sizes: '512x512',
type: 'image/webp',
purpose: 'any'
}
]
},
workbox: {
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
runtimeCaching: [
{
urlPattern: /^https:\/\/pocketbase\.ccllc\.pro\/api\/.*/i,
handler: 'NetworkFirst',
options: {
cacheName: 'api-cache',
expiration: {
maxEntries: 100,
maxAgeSeconds: 60 * 60 * 24 * 7 // 1 week
},
cacheableResponse: {
statuses: [0, 200]
}
}
}
]
}
})
],
server: {
host: '0.0.0.0',
port: 4000,
allowedHosts: [
'tasgrid.ccllc.pro'
]
},
resolve: {
alias: {
"@": path.resolve(__dirname, "./src")
}
}
})