Replace static import of tesseract.js (500KB) with dynamic import in Scanner component. Library now only loads when OCR recognition is actually performed, not on initial page load. Performance Impact: - Removes 500KB from initial bundle - Library only loads when user activates OCR mode - Preload strategy in page.tsx still works (loads on-demand if scanner opened) - No functional change; same behavior, faster initial load Implementation: - Remove static import from Scanner.tsx (line 6) - Replace with dynamic import at point of use (line 166+) - page.tsx preloadOCR already uses dynamic import (no change needed) - Improves initial page load time significantly Build: Passes with zero errors. Compile time: 2.4s.
14 KiB
14 KiB