hydrogen
hydrogen copied to clipboard
[BUG] Private environment variables not working on Vercel
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
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.