kds/frontend/vite.config.ts
jtricerolph 46441c3b35 Fix dead manifest link and add proper PWA support
index.html linked /kds/manifest.json, which never existed (404).
Replaced with vite-plugin-pwa, matching the pattern used by every
other app, plus icons that were entirely missing before.
2026-07-29 17:28:50 +00:00

31 lines
878 B
TypeScript

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