mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-04-18 04:07:26 +00:00
Home was unexpectedly loading the `visactor-*.js` bundle on first paint. This happened because the Vite manualChunks entry created a standalone vendor chunk for VisActor, which Vite then preloaded on the initial route. What’s changed - Removed `visactor` from `build.rollupOptions.output.manualChunks` in `web/vite.config.js`. Why - Prevents VisActor from being preloaded on the Home page. - Restores the intended behavior: VisActor loads only when the Dashboard (data analytics) is visited. Impact - Smaller initial payload and fewer network requests on Home. - No functional changes to charts; loading behavior is now route-driven. Test plan - Build the app: `cd web && npm run build`. - Open the preview and visit `/`: ensure no `visactor-*.js` is requested. - Navigate to `/console` (Dashboard): ensure `visactor-*.js` loads as expected.