Files
tfm_ainventory/frontend
Daniel Bedeleanu 3e60bb1707 perf(frontend): lazy-load tesseract.js OCR library
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.
2026-04-17 10:40:42 +03:00
..
2026-04-15 15:20:45 +03:00
2026-04-15 20:57:01 +03:00
2026-04-15 17:31:58 +03:00
2026-04-15 20:57:01 +03:00
2026-04-15 19:57:06 +03:00
2026-04-15 20:57:01 +03:00