diff --git a/src/app/insights/pulse/page.tsx b/src/app/insights/pulse/page.tsx index 1364d5f7f..4ab7decbc 100644 --- a/src/app/insights/pulse/page.tsx +++ b/src/app/insights/pulse/page.tsx @@ -20,7 +20,21 @@ import { MetricTargetSummary } from "@/components/insights/metric-target-summary import { EcgCrossLink } from "@/components/insights/ecg-cross-link"; import { SubPageShell } from "@/components/insights/sub-page-shell"; import { TileHeader } from "@/components/insights/tile-header"; -import { IntradayPulseChart } from "@/components/insights/intraday-pulse-chart"; +import dynamic from "next/dynamic"; +import { ChartSkeleton } from "@/components/charts/chart-skeleton"; + +// Load the intraday area chart through the shared chart-runtime boundary (the +// one recharts chunk), not as a direct import — a direct `from "recharts"` +// import would mint a second recharts fingerprint chunk and trip the bundle +// budget. Same `dynamic(() => import("@/components/charts/chart-runtime"))` +// pattern every other chart uses. +const IntradayPulseChart = dynamic( + () => + import("@/components/charts/chart-runtime").then((mod) => ({ + default: mod.IntradayPulseChart, + })), + { ssr: false, loading: () => }, +); import { getAgeFromDateOfBirth, getPersonalizedPulseTarget, diff --git a/src/components/charts/chart-runtime.ts b/src/components/charts/chart-runtime.ts index bcc70bfc1..e17e14850 100644 --- a/src/components/charts/chart-runtime.ts +++ b/src/components/charts/chart-runtime.ts @@ -42,3 +42,4 @@ export { DoseStrengthCurve } from "@/components/medications/dose-strength-curve" export { DrugLevelChart } from "@/components/medications/drug-level-chart"; export { EfficacyChart } from "@/components/medications/detail/efficacy/efficacy-chart"; export { AssessmentHistoryChart } from "@/components/mental-health/assessment-history-chart"; +export { IntradayPulseChart } from "@/components/insights/intraday-pulse-chart";