shopify hydrogen dev
Runs a Hydrogen storefront in a local runtime that emulates an Oxygen worker for development. If your project is linked(https://shopify.dev/docs/api/sho
Runs a Hydrogen storefront in a local runtime that emulates an Oxygen worker for development.
If your project is linked to a Hydrogen storefront, then its environment variables will be loaded with the runtime.
Usage
shopify hydrogen dev [flags]Summary
Runs a Hydrogen storefront in a local runtime that emulates an Oxygen worker for development.
If your project is linked to a Hydrogen storefront, then its environment variables will be loaded with the runtime.
Flags
--codegen— Automatically generates GraphQL types for your project’s Storefront API queries. optional--codegen-config-path <value>string— Specifies a path to a codegen configuration file. Defaults to<root>/codegen.tsif this file exists. optional--customer-account-push— Use tunneling for local development and push the tunneling domain to admin. Required to use Customer Account API's OAuth flow optional Environment:SHOPIFY_HYDROGEN_FLAG_CUSTOMER_ACCOUNT_PUSH.--debug— Enables inspector connections to the server with a debugger such as Visual Studio Code or Chrome DevTools. optional Environment:SHOPIFY_HYDROGEN_FLAG_DEBUG.--disable-deps-optimizer— Disable adding dependencies to Vite'sssr.optimizeDeps.includeautomatically optional Environment:SHOPIFY_HYDROGEN_FLAG_DISABLE_DEPS_OPTIMIZER.--disable-version-check— Skip the version check when runninghydrogen devoptional--disable-virtual-routes— Disable rendering fallback routes when a route file doesn't exist. optional Environment:SHOPIFY_HYDROGEN_FLAG_DISABLE_VIRTUAL_ROUTES.--entry <value>string— Entry file for the worker. Defaults to./server. optional Environment:SHOPIFY_HYDROGEN_FLAG_ENTRY.--env <value>string— Specifies the environment to perform the operation using its handle. Fetch the handle using theenv listcommand. optional--env-branch <value>string— Specifies the environment to perform the operation using its Git branch name. optional Environment:SHOPIFY_HYDROGEN_ENVIRONMENT_BRANCH.--env-file <value>string— Path to an environment file to override existing environment variables. Defaults to the '.env' located in your project path--path. optional--host— Expose the server to the local network optional--inspector-port <value>string— The port where the inspector is available. Defaults to 9229. optional Environment:SHOPIFY_HYDROGEN_FLAG_INSPECTOR_PORT.--path <value>string— The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run. optional Environment:SHOPIFY_HYDROGEN_FLAG_PATH.--port <value>string— The port to run the server on. Defaults to 3000. optional Environment:SHOPIFY_HYDROGEN_FLAG_PORT.--verbose— Outputs more information about the command's execution. optional Environment:SHOPIFY_HYDROGEN_FLAG_VERBOSE.