Add @vercel/speed-insights dependency and injectSpeedInsights in layout.server.ts
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import type { LayoutServerLoad, PageServerLoad } from "./$types";
|
||||
|
||||
import { inject } from "@vercel/analytics";
|
||||
import { injectSpeedInsights } from "@vercel/speed-insights/sveltekit";
|
||||
|
||||
if (process.env.USING_VERCEL === "true") {
|
||||
inject();
|
||||
injectSpeedInsights();
|
||||
}
|
||||
|
||||
export const load: LayoutServerLoad = async (event) => {
|
||||
|
||||
Reference in New Issue
Block a user