diff --git a/package.json b/package.json index 290e2c1..d6e76bf 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "dependencies": { "@prisma/client": "5.8.1", "@prisma/extension-accelerate": "^0.6.2", + "@vercel/speed-insights": "^1.0.8", "bits-ui": "^0.15.1", "clsx": "^2.1.0", "cmdk-sv": "^0.0.13", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 091876f..5ca501b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -11,6 +11,9 @@ dependencies: '@prisma/extension-accelerate': specifier: ^0.6.2 version: 0.6.2(@prisma/client@5.8.1) + '@vercel/speed-insights': + specifier: ^1.0.8 + version: 1.0.8(@sveltejs/kit@2.5.0)(svelte@4.2.9) bits-ui: specifier: ^0.15.1 version: 0.15.1(svelte@4.2.9) @@ -994,6 +997,34 @@ packages: - supports-color dev: true + /@vercel/speed-insights@1.0.8(@sveltejs/kit@2.5.0)(svelte@4.2.9): + resolution: {integrity: sha512-x1V9MHUMGkaNafmgY0qRbmbr+jfeU+Cvo5KgreeEGo63SFuBYRg9RS52GUJ9p82nEL6NBzc9HNru6fkcvufYcQ==} + requiresBuild: true + peerDependencies: + '@sveltejs/kit': ^1 || ^2 + next: '>= 13' + react: ^18 || ^19 + 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 + dependencies: + '@sveltejs/kit': 2.5.0(@sveltejs/vite-plugin-svelte@3.0.1)(svelte@4.2.9)(vite@5.0.12) + svelte: 4.2.9 + dev: false + /abbrev@1.1.1: resolution: {integrity: sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==} dev: true diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index 7174e5b..95d9843 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -3,8 +3,12 @@ import Navbar from "$lib/layouts/Navbar.svelte"; import { preferences } from "$lib/stores/preferences"; import { inject } from "@vercel/analytics"; + import { injectSpeedInsights } from "@vercel/speed-insights/sveltekit"; import "../app.css"; inject({ mode: dev ? "development" : "production", debug: false }); + if (!dev) { + injectSpeedInsights(); + } preferences.subscribe((value) => { if (typeof window !== "undefined") {