hydrogen buildcommand
Builds a Hydrogen storefront for production. The client and app worker files are compiled to a /dist
folder in your Hydrogen project directory.
Anchor to flagsFlags
The following flags are available for the hydrogen build
command:
Show a bundle size summary after building. Defaults to true, use --no-bundle-stats
to disable.
Automatically generates GraphQL types for your project’s Storefront API queries.
Specifies a path to a codegen configuration file. Defaults to <root>/codegen.ts
if this file exists.
Disables any warnings about missing standard routes.
Entry file for the worker. Defaults to ./server
.
Client sourcemapping is avoided by default because it makes backend code visible in the browser. Use this flag to force enabling it.
Checks that there is exactly one valid lockfile in the project. Defaults to true
. Deactivate with --no-lockfile-check
.
The path to the directory of the Hydrogen storefront. Defaults to the current directory where the command is run.
Controls whether server sourcemaps are generated. Default to true
. Deactivate --no-sourcemaps
.
Watches for changes and rebuilds the project writing output to disk.