Skip to content

Brand-Boosting-GmbH/hydrogen-2-vercel-demo

Repository files navigation

Hydrogen template: Demo Store - Vercel Deployment

This repository shows how Hydrogen "2" (2023-01+) can be deployed on Vercel Edge Functions.

Try it here: https://hydrogen-2-vercel-demo.vercel.app/

Modified files

  • server.ts
  • server-dev.ts (new)
  • remix.config.ts
  • remix.env.d.ts
  • app/lib/session.server.ts

Q & A

  • Why are there two server.ts/server-dev.ts files?

    For local development the server-dev.ts is used to work with MiniOxygen.

  • Why is "cache" removed?

    Vercel doesn't support the Cache API present in Cloudflare Workers/Oxygen, so for now its removed.

  • Why is session.server.ts changed? The Demo Store uses createCookieSessionStorage() from @shopify/remix-oxygen which wouldn't work on Vercel for me. It's replaced with a generic Cookie Session implementation.

Vercel config

image