Files
crowd-funder-for-time-pwa/vite.config.capacitor.mts
Matthew Raymer f5846cbe78 refactor(qr-scanner): improve QR code scanning with Web Workers and enhanced error handling
- Move QR code processing to Web Worker for better performance
- Add comprehensive camera state tracking and logging
- Implement proper app lifecycle management
- Add image size limits and optimization (max 1024px)
- Add proper cleanup of resources (worker, timeouts, listeners)
- Improve error handling with detailed error messages
- Add TypeScript interfaces for worker messages and QR code results
- Update Vite config to properly handle Capacitor builds
2025-04-15 09:19:29 +00:00

13 lines
411 B
TypeScript

import { defineConfig, mergeConfig } from "vite";
import { createBuildConfig } from "./vite.config.common.mts";
export default defineConfig(async () => {
const baseConfig = await createBuildConfig('capacitor');
return mergeConfig(baseConfig, {
define: {
__USE_QR_READER__: false, // Disable web QR reader on mobile
__IS_MOBILE__: true, // Enable mobile-specific features
}
});
});