Admin 921d7b63eb
Some checks failed
CI / verify (push) Has been cancelled
mirror: fieldlens d38e0922441a (2/2)
2026-09-23 01:14:37 +00:00

48 lines
1.2 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'prompt',
includeAssets: ['fieldlens-mark.svg', 'apple-touch-icon.png', 'pwa-192.png', 'pwa-512.png'],
manifest: {
name: 'FieldLens Capture',
short_name: 'FieldLens',
description: 'Offline barcode capture and duplicate detection.',
theme_color: '#17211f',
background_color: '#f7f7f2',
display: 'standalone',
start_url: '/',
icons: [
{
src: '/pwa-192.png',
sizes: '192x192',
type: 'image/png',
purpose: 'any',
},
{
src: '/pwa-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any',
},
{
src: '/pwa-512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'maskable',
},
],
},
workbox: {
cleanupOutdatedCaches: true,
navigateFallback: '/index.html',
globPatterns: ['**/*.{js,css,html,svg,wasm}'],
},
}),
],
})