Proje: Okul.com.tr CRM · Hub: Okul.com.tr CRM — Architecture
CRM Build Optimizasyonu
Vite Konfigürasyonu (vite.config.ts)
- Dev server: port 3000, auto-open
@alias →./src- Heavy deps pre-bundle:
lucide-react,jodit-react(cold start hızlandırır) - Build:
esbuildminify, source map yok
Manuel Chunk Splitting
| Chunk Adı | İçerik | Neden Ayrı |
|---|---|---|
vendor-icons | lucide-react | Büyük, sık değişmez → cache kazancı |
vendor-ui | @radix-ui/* | UI primitifler birlikte yüklenir |
vendor-forms | react-hook-form, zod | Form sayfaları için lazy |
vendor-editors | jodit, @tiptap/* | En ağır — sadece edit sayfalarında gerekli |
vendor-http | axios | HTTP client |
vendor-state | zustand | State management |
vendor-react | react-dom, react-router | React core |
Lazy Loading
src/App.tsx veya routing dosyasında React.lazy() ile route-based code splitting yapılmış olmalı.
Bundle Analizi
npm run build:analyze # dist/bundle-analysis.html oluşturur
npm run bundle-size # bundlesize checkPackage.json Scripts
npm run dev # Vite dev server (port 3000)
npm run build # Production build
npm run build:staging # Staging build
npm run build:production # Production + optimizations
npm run test # Vitest watch mode
npm run test:run # Vitest once
npm run test:coverage # Coverage reportRelated
- genel-mimari — Teknoloji yığını genel bakış