forked from trent_larson/crowd-funder-for-time-pwa
- 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
13 lines
411 B
TypeScript
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
|
|
}
|
|
});
|
|
});
|