Refactor AIPage and EQPage components to use lazy loading with PageSuspense for improved performance; update vite.config.ts to adjust chunking strategy and increase chunk size warning limit for better handling of large libraries.

This commit is contained in:
yangy
2026-05-27 18:07:36 +08:00
parent b59a7bb583
commit e6b7dcc89c
5 changed files with 70 additions and 44 deletions
+13
View File
@@ -0,0 +1,13 @@
import { Suspense, type ReactNode } from "react";
function PageFallback() {
return (
<div className="flex min-h-dvh items-center justify-center bg-[#0d1117]">
<span className="text-sm text-white/40">Loading</span>
</div>
);
}
export default function PageSuspense({ children }: { children: ReactNode }) {
return <Suspense fallback={<PageFallback />}>{children}</Suspense>;
}