Conversation
- Add hydrogen-vercel Vite plugin that generates Vercel Build Output API v3 - Add Node.js adapter for converting between Node HTTP and Web Request/Response - Add safe abort signal handling to prevent streaming SSR errors - Add Upstash Redis cache adapter with NoOpCache fallback for Vercel - Update server.ts with env/context fallbacks for Vercel serverless - Update entry.server.tsx with safe abort wrapper for streaming - Update vite.config.ts to use oxygen only in dev, vercel in build - Add vercel.json build configuration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Validation already happens in envVariables(), so getEnv() doesn't need to manually map each environment variable. This removes duplication and eliminates the need to update server.ts when adding new env vars. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Oxygen deployed a preview of your
Learn more about Hydrogen's GitHub integration. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hydrogen-vercelplugin for deploying Hydrogen storefronts to Vercel's serverless platformcachesAPIFiles Changed
lib/hydrogen-vercel/app/lib/redis-cache.tsapp/lib/context.tscachesAPI unavailableserver.tsvite.config.tsvercel()pluginvercel.jsonSetup Steps
1. Add dependencies
Add the following dependencies to your project:
@mjackson/node-fetch-server- Node.js HTTP adapter@upstash/redis- Redis client for caching@vercel/functions- Vercel waitUntil API2. Deploy
Vercel will automatically:
pnpm run build.vercel/output/(Build Output API v3)How It Works
Build Process
hydrogen-vercelplugin:server.tswith the Node.js adapter.vercel/output/functions/index.func/.vercel/output/static/.vercel/output/config.jsonRuntime
IncomingMessage→ WebRequestserver.tshandles the request using HydrogenCaching
cachesAPI (Workers KV)stale-while-revalidatefor background refresh🤖 Generated with Claude Code