From 47cbfe3846388a3bc44877cfc172b15ea3e2d21d Mon Sep 17 00:00:00 2001 From: romashka-dev Date: Wed, 1 Jan 2025 23:40:14 +0200 Subject: [PATCH] [feat] Add vercel page speed insights to track web performance --- app/layout.tsx | 2 ++ package-lock.json | 36 ++++++++++++++++++++++++++++++++++++ package.json | 1 + 3 files changed, 39 insertions(+) diff --git a/app/layout.tsx b/app/layout.tsx index fbdcb0c..ca817a3 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,6 +3,7 @@ import { Geist, Geist_Mono } from 'next/font/google' import './globals.css' import { ClerkProvider } from '@clerk/nextjs' import { Providers } from './providers' +import { SpeedInsights } from '@vercel/speed-insights/next' const geistSans = Geist({ variable: '--font-geist-sans', @@ -31,6 +32,7 @@ export default function RootLayout({ className={`${geistSans.variable} ${geistMono.variable} antialiased`} > {children} + diff --git a/package-lock.json b/package-lock.json index 79457d9..f41552c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,6 +14,7 @@ "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-select": "^2.1.4", "@radix-ui/react-slot": "^1.1.1", + "@vercel/speed-insights": "^1.1.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.469.0", @@ -2219,6 +2220,41 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@vercel/speed-insights": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@vercel/speed-insights/-/speed-insights-1.1.0.tgz", + "integrity": "sha512-rAXxuhhO4mlRGC9noa5F7HLMtGg8YF1zAN6Pjd1Ny4pII4cerhtwSG4vympbCl+pWkH7nBS9kVXRD4FAn54dlg==", + "hasInstallScript": true, + "license": "Apache-2.0", + "peerDependencies": { + "@sveltejs/kit": "^1 || ^2", + "next": ">= 13", + "react": "^18 || ^19 || ^19.0.0-rc", + "svelte": ">= 4", + "vue": "^3", + "vue-router": "^4" + }, + "peerDependenciesMeta": { + "@sveltejs/kit": { + "optional": true + }, + "next": { + "optional": true + }, + "react": { + "optional": true + }, + "svelte": { + "optional": true + }, + "vue": { + "optional": true + }, + "vue-router": { + "optional": true + } + } + }, "node_modules/acorn": { "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", diff --git a/package.json b/package.json index 0c446a6..673a90f 100644 --- a/package.json +++ b/package.json @@ -15,6 +15,7 @@ "@radix-ui/react-label": "^2.1.1", "@radix-ui/react-select": "^2.1.4", "@radix-ui/react-slot": "^1.1.1", + "@vercel/speed-insights": "^1.1.0", "class-variance-authority": "^0.7.1", "clsx": "^2.1.1", "lucide-react": "^0.469.0",