Shopify / hydrogen

Hydrogen lets you build faster headless storefronts in less time, on Shopify.
https://hydrogen.shop
MIT License
1.44k stars 273 forks source link

Add Doc for Monorepo Support #1459

Open benjaminsehl opened 1 year ago

benjaminsehl commented 1 year ago

We already support this, but we don't make it easy to figure out how.

Our CLI supports a path argument: https://shopify.dev/docs/custom-storefronts/hydrogen/cli/commands#build

and Worker Actions support a path field: https://github.com/Shopify/hydrogen/blob/main/.github/workflows/deploy.yml#L53

Let's just write a quick doc on how you can have your app build from within a monorepo.

tomferez commented 1 week ago

I have tried everything to no avail in order to set up a monorepo with yarn workspaces.

I always stumble upon the following error: Image

Launching the hydrogen app from its folder works well though - it just does not get launched with yarn run dev (even with the --path flag).