Make reports installable as a PWA
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
803332e6a3
commit
e9f1d4fdea
8 changed files with 6294 additions and 2 deletions
|
|
@ -1,7 +1,31 @@
|
|||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
export default defineConfig({
|
||||
base: '/reports/',
|
||||
plugins: [react()],
|
||||
plugins: [
|
||||
react(),
|
||||
VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
manifest: {
|
||||
name: 'Reports',
|
||||
short_name: 'Reports',
|
||||
start_url: '/reports/',
|
||||
scope: '/reports/',
|
||||
display: 'standalone',
|
||||
theme_color: '#374151',
|
||||
background_color: '#374151',
|
||||
icons: [
|
||||
{ src: '/reports/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
||||
{ src: '/reports/icons/icon-512.png', sizes: '512x512', type: 'image/png' },
|
||||
],
|
||||
},
|
||||
workbox: {
|
||||
navigateFallback: '/reports/index.html',
|
||||
navigateFallbackDenylist: [/\/api\//],
|
||||
globPatterns: ['**/*.{js,css,html,ico,png,svg}'],
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue