hydrogen icon indicating copy to clipboard operation
hydrogen copied to clipboard

[BUG] Private environment variables not working on Vercel

Open hankmander opened this issue 2 years ago • 5 comments

Describe the bug

If we take the following config from the documentation Vercel gives us ReferenceError: Oxygen is not defined . How are we supposed to use private environment variables on Vercel?

export default defineConfig({
  privateStorefrontToken:
    Oxygen?.env?.PRIVATE_STOREFRONT_API_TOKEN,
});

Additional context

  • Hydrogen version 1.6.1

hankmander avatar Nov 10 '22 13:11 hankmander

Oxygen deployed a preview of your fd-fix-cli-plugin-deps branch. Details:

Storefront Status Preview link Deployment details Last update (UTC)
metaobjects ✅ Successful (Logs) Preview deployment Inspect deployment July 8, 2024 9:19 AM
optimistic-cart-ui ✅ Successful (Logs) Preview deployment Inspect deployment July 8, 2024 9:19 AM
Skeleton (skeleton.hydrogen.shop) ✅ Successful (Logs) Preview deployment Inspect deployment July 8, 2024 9:19 AM
classic-remix ✅ Successful (Logs) Preview deployment Inspect deployment July 8, 2024 9:19 AM
custom-cart-method ✅ Successful (Logs) Preview deployment Inspect deployment July 8, 2024 9:19 AM
third-party-queries-caching ✅ Successful (Logs) Preview deployment Inspect deployment July 8, 2024 9:19 AM

Learn more about Hydrogen's GitHub integration.

shopify[bot] avatar Jul 08 '24 08:07 shopify[bot]