chore(release): sync frontend from monorepo v4

This commit is contained in:
Yamen Ahmad
2026-04-26 03:12:52 +04:00
parent 724edea349
commit 8df6804dcf
287 changed files with 43433 additions and 4653 deletions

View File

@@ -25,4 +25,45 @@ export default defineConfig(({ mode }) => ({
"@": path.resolve(__dirname, "./src"),
},
},
build: {
// Raise warning threshold slightly — route chunks and the charts vendor
// bundle legitimately trend 300500KB each and we already code-split.
chunkSizeWarningLimit: 900,
rollupOptions: {
output: {
manualChunks: {
// Pin the React core to its own chunk — it's in the critical path on
// every route and never changes between deploys, so users cache it.
"vendor-react": ["react", "react-dom", "react-router-dom"],
// React Query + auth context sit behind every authenticated page.
"vendor-query": ["@tanstack/react-query"],
// Recharts is large and only used on dashboard/report pages; keeping
// it separate lets the login/landing chunks stay small.
"vendor-charts": ["recharts"],
// Radix/shadcn primitives are shared across most pages.
"vendor-radix": [
"@radix-ui/react-dialog",
"@radix-ui/react-dropdown-menu",
"@radix-ui/react-popover",
"@radix-ui/react-select",
"@radix-ui/react-tabs",
"@radix-ui/react-toast",
"@radix-ui/react-tooltip",
"@radix-ui/react-accordion",
"@radix-ui/react-checkbox",
"@radix-ui/react-label",
"@radix-ui/react-progress",
"@radix-ui/react-radio-group",
"@radix-ui/react-scroll-area",
"@radix-ui/react-separator",
"@radix-ui/react-slider",
"@radix-ui/react-switch",
"@radix-ui/react-avatar",
],
"vendor-forms": ["react-hook-form", "@hookform/resolvers", "zod"],
"vendor-icons": ["lucide-react"],
},
},
},
},
}));