| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| modals | ||
| AnnouncementsPanel.jsx | ||
| ApiInfoPanel.jsx | ||
| ChartsPanel.jsx | ||
| DashboardHeader.jsx | ||
| FaqPanel.jsx | ||
| StatsCards.jsx | ||
| UptimePanel.jsx | ||
| index.jsx |
Home started loading `/assets/visactor-*.js` due to static imports of `@visactor/react-vchart` and the Semi theme in dashboard components/hooks. This change moves chart dependencies to lazy/dynamic imports so they load only on dashboard routes. Changes - StatsCards.jsx: replace static `VChart` import with `React.lazy` + `Suspense` (fallback: null) - ChartsPanel.jsx: replace static `VChart` import with `React.lazy` + `Suspense` (fallback: null) - useDashboardCharts.js: remove static `initVChartSemiTheme` import; dynamically import and initialize the theme inside `useEffect` with a cancel guard Behavior - Home page no longer downloads `visactor` chunks on first load - Chart libraries are fetched only when visiting `/console` (dashboard) - No functional changes to chart rendering Files - web/src/components/dashboard/StatsCards.jsx - web/src/components/dashboard/ChartsPanel.jsx - web/src/hooks/dashboard/useDashboardCharts.js Verification - Build the app (`npm run build`) and open `/`: no `/assets/visactor-*.js` requests - Navigate to `/console`: `visactor` chunks load and charts render as expected Breaking Changes - None Follow-ups - If needed, further trim homepage bundle by reducing heavy icon sets on the hero section
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| modals | Loading commit data... | |
| AnnouncementsPanel.jsx | Loading commit data... | |
| ApiInfoPanel.jsx | Loading commit data... | |
| ChartsPanel.jsx | Loading commit data... | |
| DashboardHeader.jsx | Loading commit data... | |
| FaqPanel.jsx | Loading commit data... | |
| StatsCards.jsx | Loading commit data... | |
| UptimePanel.jsx | Loading commit data... | |
| index.jsx | Loading commit data... |