chore: migrate to new Vercel speed insights package (#1876)

This commit is contained in:
Matti Nannt
2024-01-10 11:43:03 +01:00
committed by GitHub
parent 90f0614aac
commit e6ce5373a2
4 changed files with 12 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
import { SpeedInsights } from "@vercel/speed-insights/next";
import { Metadata } from "next";
import "./globals.css";
@@ -13,6 +14,7 @@ export const metadata: Metadata = {
export default function RootLayout({ children }: { children: React.ReactNode }) {
return (
<html lang="en">
{process.env.VERCEL === "1" && <SpeedInsights sampleRate={0.1} />}
<body className="flex h-screen flex-col">{children}</body>
</html>
);

View File

@@ -28,6 +28,7 @@
"@react-email/components": "^0.0.12",
"@sentry/nextjs": "^7.91.0",
"@vercel/og": "^0.6.2",
"@vercel/speed-insights": "^1.0.2",
"bcryptjs": "^2.4.3",
"dotenv": "^16.3.1",
"encoding": "^0.1.13",

8
pnpm-lock.yaml generated
View File

@@ -336,6 +336,9 @@ importers:
'@vercel/og':
specifier: ^0.6.2
version: 0.6.2
'@vercel/speed-insights':
specifier: ^1.0.2
version: 1.0.2
bcryptjs:
specifier: ^2.4.3
version: 2.4.3
@@ -9497,6 +9500,11 @@ packages:
yoga-wasm-web: 0.3.3
dev: false
/@vercel/speed-insights@1.0.2:
resolution: {integrity: sha512-y5HWeB6RmlyVYxJAMrjiDEz8qAIy2cit0fhBq+MD78WaUwQvuBnQlX4+5MuwVTWi46bV3klaRMq83u9zUy1KOg==}
requiresBuild: true
dev: false
/@vitejs/plugin-react@3.1.0(vite@5.0.10):
resolution: {integrity: sha512-AfgcRL8ZBhAlc3BFdigClmTUMISmmzHn7sB2h9U1odvc5U/MjWXsAaz18b/WoppUTDBzxOJwo2VdClfUcItu9g==}
engines: {node: ^14.18.0 || >=16.0.0}

View File

@@ -120,6 +120,7 @@
"SURVEYS_PACKAGE_BUILD",
"TELEMETRY_DISABLED",
"TERMS_URL",
"VERCEL",
"VERCEL_URL",
"WEBAPP_URL"
]