Files
vercel/examples/hydrogen
Trek Glowacki 1f09979c6f [examples] Migrate hydrogen example from yarn.lock to package-lock.json (#10766)
This example occasionally fails with `ERROR: Command "yarn install"
exited with 1 at nowDeploy`. We've noticed errors at the yarn registry
being a root cause of lots of tests failures. This migrates the example
to use the npm registry instead.

Co-authored-by: Chris Barber <chris.barber@vercel.com>
2023-10-24 17:12:11 -05:00
..

Hydrogen

Hydrogen is a React framework and SDK that you can use to build fast and dynamic Shopify custom storefronts.

Deploy Your Own

Deploy your own Hydrogen project with Vercel.

Deploy with Vercel

Live Example: https://hydrogen-template.vercel.app

Getting started

Requirements:

  • Node.js version 16.5.0 or higher
  • Yarn

To create a new Hydrogen app, run:

npm init @shopify/hydrogen

Running the dev server

Then cd into the new directory and run:

npm install
npm run dev

Remember to update hydrogen.config.js with your shop's domain and Storefront API token!

Building for production

npm run build

Previewing a production build

To run a local preview of your Hydrogen app in an environment similar to Oxygen, build your Hydrogen app and then run npm run preview:

npm run build
npm run preview