From 84a46488846604596378b6640af6428e24d1e526 Mon Sep 17 00:00:00 2001 From: Nathaniel Blackburn Date: Mon, 10 Apr 2023 09:40:29 +0100 Subject: [PATCH] Revert vercel env fix (#6776) --- .changeset/shaggy-chefs-build.md | 5 +++++ packages/integrations/vercel/src/analytics.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/shaggy-chefs-build.md diff --git a/.changeset/shaggy-chefs-build.md b/.changeset/shaggy-chefs-build.md new file mode 100644 index 000000000..de2b2caab --- /dev/null +++ b/.changeset/shaggy-chefs-build.md @@ -0,0 +1,5 @@ +--- +'@astrojs/vercel': patch +--- + +Revert change to environment variable diff --git a/packages/integrations/vercel/src/analytics.ts b/packages/integrations/vercel/src/analytics.ts index 6a06dffc0..95dee83e3 100644 --- a/packages/integrations/vercel/src/analytics.ts +++ b/packages/integrations/vercel/src/analytics.ts @@ -39,7 +39,7 @@ const sendToAnalytics = (metric: Metric, options: Options) => { }; function webVitals() { - const analyticsId = (import.meta as any).env.VERCEL_ANALYTICS_ID; + const analyticsId = (import.meta as any).env.PUBLIC_VERCEL_ANALYTICS_ID; if (!analyticsId) { console.error('[Analytics] VERCEL_ANALYTICS_ID not found'); return;