Skip to content

Commit b4225b5

Browse files
πŸš€ feat: add speed-insights to measure web performance
Add `@vercel/speed-insights` package to measure web performance metrics and improve user experience. This package is added as a dependency in the `package.json` file and is imported and used in the `layout.tsx` file to track performance metrics. This change allows us to monitor and optimize the performance of our web application.
1 parent 0d2cd0e commit b4225b5

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

β€Žapps/web/app/layout.tsxβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { PHProvider, PostHogPageview } from "./posthogProvider";
1111
import Script from "next/script";
1212
import { Metadata } from "next";
1313
import { TanQueryProvider } from "@/components/TanQueryProvider";
14+
import { SpeedInsights } from "@vercel/speed-insights/next";
1415

1516
const inter = Inter({
1617
subsets: ["latin"],
@@ -77,6 +78,7 @@ export default function RootLayout({
7778
</ThemeProvider>
7879
</div>
7980
<Suspense>
81+
<SpeedInsights />
8082
<AuthUser />
8183
<PostHogPageview />
8284
</Suspense>

β€Žapps/web/package.jsonβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"@types/react": "^18.2.24",
3535
"@types/react-dom": "^18.2.9",
3636
"@vercel/analytics": "^1.1.1",
37+
"@vercel/speed-insights": "^1.0.10",
3738
"aos": "^3.0.0-beta.6",
3839
"canvas-confetti": "^1.9.2",
3940
"class-variance-authority": "^0.7.0",

β€Žapps/web/yarn.lockβ€Ž

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,11 @@
13851385
dependencies:
13861386
server-only "^0.0.1"
13871387

1388+
"@vercel/speed-insights@^1.0.10":
1389+
version "1.0.10"
1390+
resolved "https://registry.yarnpkg.com/@vercel/speed-insights/-/speed-insights-1.0.10.tgz#2e2e6a16beff72cbb58fd59ea8deb18f7338a014"
1391+
integrity sha512-4uzdKB0RW6Ff2FkzshzjZ+RlJfLPxgm/00i0XXgxfMPhwnnsk92YgtqsxT9OcPLdJUyVU1DqFlSWWjIQMPkh0g==
1392+
13881393
agent-base@6:
13891394
version "6.0.2"
13901395
resolved "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz"

0 commit comments

Comments
Β (0)