shopify hydrogen build
Builds a Hydrogen storefront for production. The client and app worker files are compiled to a /dist folder in your Hydrogen project directory.
Builds a Hydrogen storefront for production. The client and app worker files are compiled to a /dist folder in your Hydrogen project directory.
Usage
shopify hydrogen build [flags]Summary
Builds a Hydrogen storefront for production. The client and app worker files are compiled to a /dist folder in your Hydrogen project directory.
Flags
--bundle-stats— Show a bundle size summary after building. Defaults to true, use--no-bundle-statsto disable. optional--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--disable-route-warning— Disables any warnings about missing standard routes. optional Environment:SHOPIFY_HYDROGEN_FLAG_DISABLE_ROUTE_WARNING.--entry <value>string— Entry file for the worker. Defaults to./server. optional Environment:SHOPIFY_HYDROGEN_FLAG_ENTRY.--force-client-sourcemap— Client sourcemapping is avoided by default because it makes backend code visible in the browser. Use this flag to force enabling it. optional Environment:SHOPIFY_HYDROGEN_FLAG_FORCE_CLIENT_SOURCEMAP.--lockfile-check— Checks that there is exactly one valid lockfile in the project. Defaults totrue. Deactivate with--no-lockfile-check. optional Environment:SHOPIFY_HYDROGEN_FLAG_LOCKFILE_CHECK.--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.--sourcemap— Controls whether server sourcemaps are generated. Default totrue. Deactivate--no-sourcemaps. optional Environment:SHOPIFY_HYDROGEN_FLAG_SOURCEMAP.--watch— Watches for changes and rebuilds the project writing output to disk. optional Environment:SHOPIFY_HYDROGEN_FLAG_WATCH.