fieldlens-deploy/apps/web/vite.config.ts
Admin da34221539
Some checks failed
CI / verify (push) Has been cancelled
mirror: fieldlens d38e0922441a (1/2)
2026-09-23 01:14:28 +00:00

35 lines
1.2 KiB
TypeScript

import { fileURLToPath, URL } from 'node:url'
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
publicDir: fileURLToPath(new URL('../../packages/fieldlens-core/public', import.meta.url)),
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: 'Local-first barcode, pallet and carton-label capture.',
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,png}']
}
})
]
})