Update layout server and svelte files to use USING_VERCEL environment variable

This commit is contained in:
Sean Morley
2024-04-19 00:14:33 +00:00
parent a2c5b435e2
commit ce2ea2f36f
2 changed files with 10 additions and 7 deletions

View File

@@ -7,6 +7,13 @@
import { goto } from "$app/navigation";
import { onMount } from "svelte";
import { page } from "$app/stores";
import { inject } from "@vercel/analytics";
import { injectSpeedInsights } from "@vercel/speed-insights/sveltekit";
if (data.usingVercel === "true") {
inject();
injectSpeedInsights();
}
let isServerSetup = data.isServerSetup;