Skip to main content

hydrogen generate routes
command

Generates all supported standard shopify routes.

The following flags are available for the hydrogen generate routes command:

string
env: SHOPIFY_HYDROGEN_FLAG_ADAPTER

Remix adapter used in the route. The default is @shopify/remix-oxygen.

Anchor to --locale-param <value>
--locale-param <value>
string
env: SHOPIFY_HYDROGEN_FLAG_ADAPTER

The param name in Remix routes for the i18n locale, if any. Example: locale becomes ($locale).

string
env: SHOPIFY_HYDROGEN_FLAG_PATH

The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.

env: SHOPIFY_HYDROGEN_FLAG_TYPESCRIPT

Generate TypeScript files

env: SHOPIFY_HYDROGEN_FLAG_FORCE

Overwrites the destination directory and files if they already exist.

Was this section helpful?

Hydrogen generate routes

shopify hydrogen generate routes [flags]