Make maintenance installable as a PWA

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-11 11:27:00 +00:00
parent 83ac37e4a1
commit ced0754fcc
7 changed files with 4423 additions and 3 deletions

View file

@ -1,7 +1,31 @@
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
base: '/maintenance/',
plugins: [react()],
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
manifest: {
name: 'Maintenance',
short_name: 'Maint.',
start_url: '/maintenance/',
scope: '/maintenance/',
display: 'standalone',
theme_color: '#b45309',
background_color: '#b45309',
icons: [
{ src: '/maintenance/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
{ src: '/maintenance/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
],
},
workbox: {
navigateFallback: '/maintenance/index.html',
navigateFallbackDenylist: [/\/api\//],
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
},
}),
],
})