Adopt Hydrogen incrementally
Some merchants may prefer to adopt the Hydrogen storefront incrementally. For instance, they might want to initially create their product pages in Hydrogen while continuing to serve other pages with Liquid during the migration process.
To achieve this in Hydrogen, you can programmatically proxy your Liquid online store routes to be served by your Hydrogen app on a request-by-request basis.
Requirements
Anchor link to section titled "Requirements"Limitations
Anchor link to section titled "Limitations"- Incremental adoption is only supported with Oxygen.
- Customer sessions can't be shared between the online store and the Hydrogen storefront without using Multipass.
Proxy routes to the online store
Anchor link to section titled "Proxy routes to the online store"You can leverage Remix's catch-all route (app/routes/$.jsx
) to fall back to the Online Store by default, or handle each route individually in the appropriate file (e.g., app/routes/products/$handle.jsx
).
Here's an example of how to create a catch-all proxy route: