The Salesforce Developers website will undergo maintenance on May 29, 2024 from 3:00 a.m. UTC to 10:00 a.m. UTC. The maintenance process may affect the availability of our documentation. Please plan accordingly.

lwr build

The lwr build command generates static site files as well as any configuration files for specified command {options}.

OptionTypeRequired/OptionalDescription
-t, --target <target>StringOptionalSet the site deployment target. If a target isn't specified, the default value is default. Accepted values are:
    default - Generates the static site wouthout any configuration options.
    netlify - Generates the static site with a Netlify configuration.
-m, --mode <mode>StringOptionalSet the server mode. Accepted values are prod and prod-compat.
-o, --output <directory>StringOptionalSet the output directory for all of your static site files. If a directory isn't specified, the default value is app.
--cleanBooleanOptionalDelete an existing output directory. If the specified output directory already exists, the console logs a warning. By default, an existing output directory isn't deleted.
-r, --routes <routes...>RoutesOptionalSpecify the routes to include during the build using regex. If routes aren't specified, the default value is [].
-m, --modules <modules...>ModulesOptionalSpecify additional modules to be generated during the build. If modules aren't specified, the default value is [].
-l, --locales <locales...>LocalesOptionalSpecify the list of locales to build your site for. The default value is ['en'].
--minifyBooleanOptionalMinify the build output. By default, build output isn't minified.
-h, --helpOptionalView help text for lwr build options in the CLI.